From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13143 invoked by alias); 18 Nov 2004 15:56:43 -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 13076 invoked from network); 18 Nov 2004 15:56:35 -0000 Received: from unknown (HELO relay2.mail.uk.clara.net) (80.168.70.142) by sourceware.org with SMTP; 18 Nov 2004 15:56:35 -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 1CUoeB-000MVN-AT; Thu, 18 Nov 2004 15:56:35 +0000 Message-ID: <419CC729.6050708@redhat.com> Date: Thu, 18 Nov 2004 15:56: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> <419C6925.8010007@redhat.com> <1100776504.23221.47.camel@pc960.cambridge.arm.com> In-Reply-To: <1100776504.23221.47.camel@pc960.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00375.txt.bz2 Hi Richard, >> Or maybe >>builtins-config.h could include say rather than so >>that it would pickup the newlib version and not the gcc version ? > That might be OK for this case, but I'm not sure if will solve the > problem generally. I have confirmed that using in place of does fix the unexpected failures. Is there actually a general problem ? The issue seems to be which version of is included by a test case using the dejagnu test harness. If we include the newlib version then tests that use strict ANSI parsing will fail. If we include the version in the gcc build directory then tests that assume that has come from newlib will fail. It seems to me that using -isystem to include header files in the newlib include directories is the correct thing to do. They are system header files after all. Assuming that you can determine whether you are going to link with a C-library created by newlib by #include'ing seems dodgy to me. Using instead of is a workaround, but really the testcases ought to provide some weak aliases for the missing functions and then the _NEWLIB_VERSION check would be unnecessary. (It would limit the tests to only being run by targets which support weak aliases but I do not consider this to be a serious restriction). > I think the gcc/include directory must be added implicitly from the -B > option. It would appear that these add -isystem type include > directories, so it might be just a matter of ordering the -B and > -isystem options appropriately. But - how would this help in the situation where -ansi and -pedantic have been specified as well. In those cases we do not want to get the limits.h file from newlib. Cheers Nick