Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Jul 2011 00:09:45 +0200
From:      Matthias Andree <matthias.andree@gmx.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: [PATCH] Remove -nostdinc in aicasm
Message-ID:  <4E0F9729.9080002@gmx.de>
In-Reply-To: <alpine.GSO.1.10.1107021120450.6818@multics.mit.edu>
References:  <CAOfDtXNRwaa8VrnhXZsgFb3uPTFPxZYXtLWX3WHMAq8PQaP7Wg@mail.gmail.com> <alpine.GSO.1.10.1107021120450.6818@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 02.07.2011 17:25, schrieb Benjamin Kaduk:
> On Sat, 2 Jul 2011, Robert Millan wrote:
> 
>> The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being
>> built with "-nostdinc -I/usr/include" options.  Unfortunately this breaks
>> building aicasm on systems using the upstream version of GCC, where
>> "-nostdinc" disables more search directories than are enabled by
>> "-I/usr/include".
> 
> There is a functional difference between '-nostdinc -I/usr/include -I.'
> even when the standard include search path is just /usr/include -- the
> standard include paths are always searched last (unless -nostdinc is
> given), even if they are explicitly listed on the command line.  If
> there are conflicting definitions in /usr/local/foo.h and ./foo.h, this
> gimmick can be necessary to pull in the correct version.  (I've needed
> to do this when packaging software for the freebsd ports collection,
> though with /usr/local/include replacing '.'.)

Note that there are GCC-version-specific directories for the more
intricate details such as stdarg.h and compiler-specific builtins -- you
don't get those with -I/usr/include either.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E0F9729.9080002>