From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1847 invoked by alias); 18 Nov 2004 09:15:35 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1735 invoked from network); 18 Nov 2004 09:15:29 -0000 Received: from unknown (HELO relay2.mail.uk.clara.net) (80.168.70.142) by sourceware.org with SMTP; 18 Nov 2004 09:15:29 -0000 Received: from adsl-2-solo-172-135.claranet.co.uk ([80.168.172.135] helo=[172.31.0.98]) by relay2.mail.uk.clara.net with esmtp (Exim 4.34) id 1CUiO0-000EaV-C0; Thu, 18 Nov 2004 09:15:28 +0000 Message-ID: <419C6925.8010007@redhat.com> Date: Thu, 18 Nov 2004 09:15:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) MIME-Version: 1.0 To: Richard Earnshaw CC: binutils@sources.redhat.com, gdb-patches@sources.redhat.com, newlib@sources.redhat.com Subject: Re: Dejagnu: use -isystem to include system header files. References: <1100713585.23221.6.camel@pc960.cambridge.arm.com> In-Reply-To: <1100713585.23221.6.camel@pc960.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00369.txt.bz2 Hi Richard, > Nick Clifton wrote: > I am going to check in the attached patch which imports a fix from > the mainline dejagnu sources. This fix is to use the -isystem > switch to include system header files rather than -I. This fixes > several unexpected failures in the GCC and G++ testsuites where the > newlib system header file is included in strict ANSI > mode, and the compiler barfs on the #include_next directive. > > Unfortunately this patch causes regressions on the gcc builtins tests. > These tests rely on detecting newlib by looking for the definition of > _NEWLIB_VERSION being added by including limits.h; but the change in the > search order means that we now pick up a dummy version of newlib.h from > the gcc include directory. > > With your patch the search path has now become > > /work/rearnsha/gnu/egcs/gcc/include > /work/rearnsha/gnu/egcs/arm-elf/./newlib/targ-include > /home/rearnsha/gnusrc/egcs-cross/newlib/libc/include > > Whereas previously the gcc/include directory came later in the search. Hmmm, maybe newlib could provide the "l" variants of the builtin functions ? What are these functions anyway ? Or maybe builtins-config.h could include say rather than so that it would pickup the newlib version and not the gcc version ? Alternatively - can you think of another way of solving the problem that my patch was originally fixing ? Namely that several GCC and G++ tests fail because they include whilst in strict ANSI mode and this fails because the newlib limits.h uses the GNU extension #include_next directive. My first patch to solve this - by undefining __GNUC__ if __STRICT_ANSI__ was defined was rejected on the gcc lists. Cheers Nick