[PATCH] Remove -nostdinc in aicasm
Benjamin Kaduk
kaduk at MIT.EDU
Sat Jul 2 15:25:58 UTC 2011
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 '.'.)
I have not checked whether this affects aicasm, though (which may or may
not manifest itself as compiler warnings).
-Ben Kaduk
>
> This was introduced by obrien (CCed) in 2002, apparently to remove a
> warning. I've verified that removing it doesn't produce any warnings
> on FreeBSD 9-CURRENT environment.
>
> Please consider this patch to remove -nostdinc in that file.
>
> --
> Robert Millan
>
More information about the freebsd-hackers
mailing list