From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12711 invoked by alias); 4 Oct 2009 04:11:39 -0000 Received: (qmail 12702 invoked by uid 22791); 4 Oct 2009 04:11:38 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Oct 2009 04:11:34 +0000 Received: from spaceape8.eur.corp.google.com (spaceape8.eur.corp.google.com [172.28.16.142]) by smtp-out.google.com with ESMTP id n944BVTO016877 for ; Sat, 3 Oct 2009 21:11:32 -0700 Received: from qw-out-2122.google.com (qwi5.prod.google.com [10.241.195.5]) by spaceape8.eur.corp.google.com with ESMTP id n944BSXp005329 for ; Sat, 3 Oct 2009 21:11:29 -0700 Received: by qw-out-2122.google.com with SMTP id 5so695811qwi.39 for ; Sat, 03 Oct 2009 21:11:28 -0700 (PDT) Received: by 10.224.41.84 with SMTP id n20mr2291648qae.205.1254629488539; Sat, 03 Oct 2009 21:11:28 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id 4sm686562qwe.8.2009.10.03.21.11.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Oct 2009 21:11:26 -0700 (PDT) To: "Paul Edwards" Cc: Subject: Re: i370 port - constructing compile script References: <200909251516.n8PFGPYn014618@d12av02.megacenter.de.ibm.com> <4F1842D6879348899E3A1999066969F5@Paullaptop> <4AC39435.8010902@redhat.com> <36D486ECFFC04FBD8318DFDD333FD206@Paullaptop> <7AE4510479514D0E9B72A9B827275199@Paullaptop> From: Ian Lance Taylor Date: Sun, 04 Oct 2009 04:11:00 -0000 In-Reply-To: <7AE4510479514D0E9B72A9B827275199@Paullaptop> (Paul Edwards's message of "Sat\, 3 Oct 2009 08\:53\:25 +1000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00070.txt.bz2 "Paul Edwards" writes: >> * Configure gcc as a cross-compiler. > > So this would not be considered a Canadian Cross after all, > and with configure I only change the target, not the host? The end result is a Canadian Cross, but the first step in a typical build of a Canadian Cross is a cross-compiler. >> * Write a cross-assembler and cross-linker. > > Sure, and that's what I'm trying to avoid. I have a perfectly working > assembler and linker on MVS already. It's been working for several > decades. There are many advantages of a cross-assembler and cross-linker, but, whatever. >> * Copy header files and libraries from the host (MVS). > > That's fine. And use the --with-root option of configure to get > them used? --with-sysroot, yes. >> (Note that you mention fork, but as you probably know the gcc code >> never actually calls fork. It calls the pexecute routines in >> libiberty. Those routines have been ported to several different >> hosts, including MS-DOS. If you port them to MVS, then you don't have >> to worry about fork.) > > I spent several minutes going through the config.h looking at the > "detected" functions to find a good example. Maybe I should I > have getrlimit or getrusage or fputs_unlocked instead. fputs_unlocked is only used for systems which provide it. On systems which don't, gcc uses fputs. Similarly, getrlimit and getrusage are entirely optional. They are used if available, otherwise not. I've been discussing this under the assumption that you want to contribute your port back to gcc. If you don't, then I think I will step out. You can pursue whatever path you like. Ian