2011/7/2 Robert Millan <r...@debian.org>: > 2011/7/2 Benjamin Kaduk <ka...@mit.edu>: >> 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 '.'.) > > In this case I'd rather be safe than sorry and use -iwithprefix or > -isystem `gcc --print-file-name=` on GCC only.
I hope this patch is better. Please have a look. -- Robert Millan
Index: sys/dev/aic7xxx/aicasm/Makefile =================================================================== --- sys/dev/aic7xxx/aicasm/Makefile (revision 223721) +++ sys/dev/aic7xxx/aicasm/Makefile (working copy) @@ -26,6 +26,13 @@ NOSTDINC= -nostdinc CFLAGS+= ${NOSTDINC} -I/usr/include -I. +# This is needed when using upstream GCC (whose <stddef.h>, etc, are +# not re-enabled by -I/usr/inclde). +.if ${CC:T:Mclang} != "clang" +GCCINCDIR!= gcc --print-file-name= +CFLAGS+= -I${GCCINCDIR}/include -I${GCCINCDIR}/include-fixed +.endif + .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} .endif
_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"