Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: Dejagnu: use -isystem to include system header files.
@ 2004-11-17 17:47 Richard Earnshaw
  2004-11-18  9:15 ` Nick Clifton
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Earnshaw @ 2004-11-17 17:47 UTC (permalink / raw)
  To: nickc; +Cc: binutils, gdb-patches, newlib

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 <limits.h> 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.

R.


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Dejagnu: use -isystem to include system header files.
@ 2004-11-18 20:07 Richard Earnshaw
  2004-11-22 14:05 ` Nick Clifton
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Earnshaw @ 2004-11-18 20:07 UTC (permalink / raw)
  To: Nick Clifton, Richard Earnshaw; +Cc: binutils, gdb-patches, newlib

> > 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.

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
using -isystem.

R.


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <m3pt2koaw8.fsf@redhat.com>]

end of thread, other threads:[~2004-11-22 14:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 17:47 Dejagnu: use -isystem to include system header files Richard Earnshaw
2004-11-18  9:15 ` Nick Clifton
2004-11-18 11:15   ` Richard Earnshaw
2004-11-18 15:56     ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2004-11-18 20:07 Richard Earnshaw
2004-11-22 14:05 ` Nick Clifton
     [not found] <m3pt2koaw8.fsf@redhat.com>
2004-11-11 14:22 ` Daniel Jacobowitz
2004-11-11 15:54   ` Nick Clifton
2004-11-11 17:00     ` Daniel Jacobowitz
2004-11-12  0:25   ` Hans-Peter Nilsson
2004-11-12  0:29     ` Daniel Jacobowitz
2004-11-12  1:30       ` Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox