[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[solved] kernel compilation error on stdarg.h



Hi,

Sorry if this had already been solved but I'm so happy not to bang my
head anymore !

Main Makefile in kernel tree has
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
where it should be read
NOSTDINC_FLAGS += -nostdinc -isystem $(shell cd /; $(CC) -print-file-name=include)

On my debian install 
gcc -print-file-name=include 
gives 
./include 
when called from linux tree, because there is an include file in the
calling directory.

When called from / it gives the correct answer
/usr/lib/gcc-lib/i486-linux/3.3.5/include

This was resulting in an error at compilation not finding stdarg.h
because -nostdinc causes gcc to ignore standard include files and gcc
-print-file-name=include is used to regenerate the special directory
where stdarg.h lives.

I hope this helps


Florent Chabaud
gpg: 28C9 9E1A 5507 5574 EDE6  2E8F 2B37 D83F 95C8 1C3C
http://www.carva.org/florent.chabaud | florent.chabaud@polytechnique.org

Attachment: pgpbjUkks88vI.pgp
Description: PGP signature


Reply to: