stdarg.h is part of the compiler specific includes. We want to pick
up on these, so we use "-iwithprefix include" to add the compiler specific
includes back.
Unfortunately, there seems to be something wrong with GCC's ability to
determine where these includes really reside when GCC is installed in
a different location to the one it was configured with. In other words,
don't do that. Install GCC to the location where you told it to be
installed.
For instance, on a Red Hat machine, try:
# cp /usr/bin/gcc /usr/local/bin
# hash -r
# touch t.c
# gcc -nostdinc -iwithprefix include -v t.c
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
/usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -nostdinc -v -iprefix
/usr/local/bin/../lib/gcc-lib/i386-redhat-linux/2.96/ -D__GNUC__=2
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux
-D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix)
-D__NO_INLINE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
-D__tune_i386__ -iwithprefix include t.c
GNU CPP version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.2) (cpplib)
(i386 Linux/ELF)
ignoring nonexistent directory "/usr/local/lib/gcc-lib/i386-redhat-linux/2.96/include"
#include "..." search starts here:
End of search list.
# rm /usr/local/bin/gcc
# hash -r
and note that it fails.
> Try this:
the search directory each time we build the compiler? Would it not
be better to cache the result ?
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/