From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31974 invoked by alias); 12 Nov 2009 20:56:30 -0000 Received: (qmail 31965 invoked by uid 22791); 12 Nov 2009 20:56:29 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f195.google.com (HELO mail-px0-f195.google.com) (209.85.216.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Nov 2009 20:56:23 +0000 Received: by pxi34 with SMTP id 34so266832pxi.8 for ; Thu, 12 Nov 2009 12:56:22 -0800 (PST) Received: by 10.115.132.12 with SMTP id j12mr1179391wan.121.1258059382233; Thu, 12 Nov 2009 12:56:22 -0800 (PST) Received: from Paullaptop (203-158-49-56.dyn.iinet.net.au [203.158.49.56]) by mx.google.com with ESMTPS id 22sm1935976pxi.10.2009.11.12.12.56.18 (version=SSLv3 cipher=RC4-MD5); Thu, 12 Nov 2009 12:56:20 -0800 (PST) Message-ID: <43D420BFBDFB47D3B050104A3560768E@Paullaptop> From: "Paul Edwards" To: "Ralf Wildenhues" Cc: "Ulrich Weigand" , "Ian Lance Taylor" , References: <200910191419.n9JEJcvD023336@d12av02.megacenter.de.ibm.com> <20091112200557.GB25110@gmx.de> In-Reply-To: <20091112200557.GB25110@gmx.de> Subject: Re: i370 port - constructing compile script Date: Thu, 12 Nov 2009 20:56:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit 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-11/txt/msg00366.txt.bz2 > * Paul Edwards wrote on Thu, Nov 12, 2009 at 03:02:59PM CET: >> Well, I have good news to report. The restructuring was a success. >> >> That means with those 30-odd changes to the configure scripts, I >> was able to get an auto-host.h built that allowed me to take the >> generated source and compile it with my own scripts as per >> normal. > > It would be a good idea if you took the extra mile and reported all > these changes to the bug-autoconf mailing list, so it could be fixed > for good there. I was under the impression that the root cause was a problem with configure.ac in gcc rather than autoconf. However, I took a look at that file, and I can only see a couple of references to sys/types.h, none of which look the same as the sort of thing I needed to change. /* end confdefs.h. */ #include #include + #if !defined(__MVS__) #include #include + #endif cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "confdefs.h" + #if !defined(__MVS__) #include + #endif > Furthermore, it would be really good if we could get Autoconf to build > and run on your system, so you could run its test suite there. That > would provide much better coverage of all the issues that would need > fixing, and allow us to fix them once in the macros, instead of having > you do this repeatedly in every configure script. I am running on a Linux box! The thing I am doing that is unusual is two things: 1. Only providing C90 headers when cross-building a host. That means that things like sys/types are failing. 2. No linking is done, because I don't have a cross-linker. As far as I can tell, peculiarity number 2 has not caused the need for any changes, with the possible exception of ones like this: + #if !defined(__MVS__) #include #include + #endif + #if defined(__MVS__) + #define BIG_ENDIAN 1 + #define LITTLE_ENDIAN 2 + #define BYTE_ORDER 1 + #endif I'm not sure what that one was all about, and I'm not sure the result of it is even used. Note that peculiarity 2 ideally requires prototypes for all functions, so there were a couple of other changes made to the gcc 3.4.6 code, such as this one: #ifdef HAVE_SYS_RESOURCE_H #include #endif ! #if defined (HAVE_DECL_GETRUSAGE) && !HAVE_DECL_GETRUSAGE extern int getrusage (int, struct rusage *); #endif --- 86,100 ---- #include "prefix.h" #include "gcc.h" #include "flags.h" #ifdef HAVE_SYS_RESOURCE_H #include #endif ! #if defined (HAVE_GETRUSAGE) && !HAVE_DECL_GETRUSAGE extern int getrusage (int, struct rusage *); #endif Anyway, all of this should be reproducible building any ASCII target on any ASCII machine, just by using a C90 set of head files and a dummy compile script like this: C:\devel\gccnew\gcc\config\i370>type i370-mvspdp-gcc echo $* >>/tmp/build.txt i370-mvspdp-xxx -Werror-implicit-function-declaration -DPUREISO -S -I /devel/mvshead/usr/include $* Note the '-S' which could be '-c' instead and the -W. > However, Autoconf requires Perl and GNU M4 (and some shell environment > as well as a make program), so I'm not sure whether it is possible to > get to this point. Those are all available on the build machine, even though, out of those, only m4 is available on the host. :-) BFN. Paul.