This is the mail archive of the
mailing list for the binutils project.
Re: Dejagnu: use -isystem to include system header files.
- From: Nick Clifton <nickc at redhat dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Cc: Richard Earnshaw <rearnsha at gcc dot gnu dot org>, binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com, newlib at sources dot redhat dot com
- Date: Mon, 22 Nov 2004 14:09:59 +0000
- Subject: Re: Dejagnu: use -isystem to include system header files.
- References: <89A528FE6DB0FA44877BB2F05B8467180160F913@ZIPPY.Emea.Arm.com>
The issue wasn't really about picking up gcc/include/limits.h over
newlib/include/limits.h, it was about how we processed the newlib
version when in strict ANSI mode. That should be handled correctly when
we use -isystem (because that relaxes the rules). So I think we should
try and get the search order back to what it was before, but when still
I am not sure that this is possible. The <build-dir>/gcc/include
directory is added via an -isystem switch that is synthesised by the gcc
(or xgcc) compiler driver. It is processed before any-isystem switch
specified by the user on the command line so that gcc's fixed versions
of system header files will be included before the systems. Thus if the
dejagnu test harness uses the -isystem switch to add the
newlib/libc/include directory it is always going to be after
<build-dir>/gcc/include in the list of directories searched.
This sounds correct to me. The intention is that the fixed version of
limits.h should be included before the system version of limits.h. Thus
builtins-config.h should not assume that #include <limits.h> will return
the system limits.h. It might well return a fixed version instead.