On Sun, Nov 15, 2009 at 12:17:50PM +0100, Felix Zielcke wrote: > > The advantage is that this does exatly what we want for the target. > Remove /usr/include from the include search directories but still keep > the gcc internal one for e.g. stdarg.h > As far as I understand the gcc manual, isystem adds this directory to > the search path and treats all headers there in as system headers. > And with the = between -isystem and $(srcdir) it actually uses > ${sysroot}{$srcdir} but we don't use any --sysroot or -isysroot. > The arguments we currently have there just look wrong with my understand > of the gcc manual
Ah, I see.. > $ cat test.c > #include <stdarg.h> > #include <stdint.h> > > int main (void) > { > return 0; > } > > $ srcdir=$PWD builddir=$PWD gcc -isystem=$srcdir/include -I$srcdir/include > -I$builddir -I$builddir/include test.c -o test && ls test > test > $ srcdir=$PWD builddir=$PWD gcc -nostdinc -isystem $(gcc > -print-file-name=include) -I$srcdir/include -I$builddir -I$builddir/include > test.c > test.c:2:20: error: stdint.h: No such file or directory We used -isystem as a way of excluding system headers but not gcc headers. With the -print-file-name trick this seems to be no longer necessary, right? So why not "-nostdinc -I$(gcc -print-file-name=include)" instead? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel