From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1651 invoked by alias); 9 Nov 2010 14:19:40 -0000 Received: (qmail 1491 invoked by uid 22791); 9 Nov 2010 14:19:37 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Nov 2010 14:19:32 +0000 Received: by iwn42 with SMTP id 42so7860622iwn.20 for ; Tue, 09 Nov 2010 06:19:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.228.202 with SMTP id jf10mr4617953icb.455.1289312369582; Tue, 09 Nov 2010 06:19:29 -0800 (PST) Received: by 10.42.176.193 with HTTP; Tue, 9 Nov 2010 06:19:29 -0800 (PST) In-Reply-To: <4CD9578B.6010208@gnu.org> References: <4CD9578B.6010208@gnu.org> Date: Tue, 09 Nov 2010 14:19:00 -0000 Message-ID: Subject: Re: PATCH RFA: Build system: Use AC_SYS_LARGEFILE From: David Edelsohn To: Paolo Bonzini Cc: Ian Lance Taylor , Richard Guenther , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00897.txt.bz2 Paolo, There is no problem in libcpp. There is a warning about freopen redefined in system.h, but I mistook that for another failure. The main problem seems to be gengtype-lex.c, which is generated by Flex. Flex inserted #include although gengtype-lex.l already includes #include "bconfig.h" #include "system.h" in the correct order and system.h includes stdio.h. I will try the gengtype-lex.l patch. Thanks, David On Tue, Nov 9, 2010 at 9:15 AM, Paolo Bonzini wrote: >> bconfig.h includes auto-host.h, which defines _LARGE_FILES. >> >> libcpp/directives.c also fails with similar errors, although it is not >> obvious how headers are included in the wrong order >> >> I have no objection to enabling LARGE FILES support in GCC, but the >> headers must be included in the correct order to allow bootstrap on >> AIX. > > Is something like this enough? > > Index: libcpp/configure.ac > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libcpp/configure.ac (revision 166028) > +++ libcpp/configure.ac (working copy) > @@ -13,6 +13,7 @@ AC_PROG_INSTALL > =A0AC_PROG_CC > =A0AC_PROG_CXX > =A0AC_PROG_RANLIB > +AC_SYS_LARGEFILE > > =A0# See if we are building gcc with C++. > =A0# Do this early so setting lang to C++ affects following tests > Index: gcc/gengtype-lex.l > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- gcc/gengtype-lex.l =A0(revision 166028) > +++ gcc/gengtype-lex.l =A0(working copy) > @@ -23,6 +23,10 @@ along with GCC; see the file COPYING3. > > =A0%{ > =A0#include "bconfig.h" > + > +/* stdio.h has been included already by the flex skeleton, so > + =A0 defining _LARGE_FILES here would break bootstrap on AIX. =A0*/ > +#undef _LARGE_FILES > =A0#include "system.h" > > =A0#define malloc xmalloc >