diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-12-29 02:15:39 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-12-29 02:15:39 +0100 |
commit | c97a20fb5b9e2f7e518d689e618971969f1df5cd (patch) | |
tree | 44315d03e7e03b83848b0a0ebb93896a04c1fb99 /Makefile | |
parent | df3e98d645023ac8d78f5837ed5fc5c113548778 (diff) | |
download | history-c97a20fb5b9e2f7e518d689e618971969f1df5cd.tar.gz |
kbuild: Use -isystem `gcc --print-file-name=include`
Using "-nostdinc -isystem `gcc --print-file-name=include" let
us see full path to compiler specific files when compiling with make V=1
Furthermore it lets us use same definition for sparse (CHECKFLAGS) and the kernel.
Tested with gcc 3.3.4 only.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile index c48bfc9e3dfad7..000fbdaddf6aed 100644 --- a/Makefile +++ b/Makefile @@ -330,7 +330,10 @@ DEPMOD = /sbin/depmod KALLSYMS = scripts/kallsyms PERL = perl CHECK = sparse + +NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ +CHECKFLAGS += $(NOSTDINC_FLAGS) MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS) @@ -338,7 +341,6 @@ LDFLAGS_MODULE = -r CFLAGS_KERNEL = AFLAGS_KERNEL = -NOSTDINC_FLAGS = -nostdinc -iwithprefix include # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option |