Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Richard Earnshaw <rearnsha@gcc.gnu.org>
Cc: binutils@sources.redhat.com,  gdb-patches@sources.redhat.com,
	 newlib@sources.redhat.com
Subject: Re: Dejagnu: use -isystem to include system header files.
Date: Thu, 18 Nov 2004 15:56:00 -0000	[thread overview]
Message-ID: <419CC729.6050708@redhat.com> (raw)
In-Reply-To: <1100776504.23221.47.camel@pc960.cambridge.arm.com>

Hi Richard,

>> Or maybe 
>>builtins-config.h could include say <stdio.h> rather than <limits.h> 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 <stdio.h> in place of <limits.h> does fix 
the unexpected failures.

Is there actually a general problem ?  The issue seems to be which 
version of <limits.h> 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 <limits.h> 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 <limits.h> 
seems dodgy to me.  Using <stdio.h> instead of <limits.h> 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


  reply	other threads:[~2004-11-18 15:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-17 17:47 Richard Earnshaw
2004-11-18  9:15 ` Nick Clifton
2004-11-18 11:15   ` Richard Earnshaw
2004-11-18 15:56     ` Nick Clifton [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=419CC729.6050708@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=newlib@sources.redhat.com \
    --cc=rearnsha@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox