summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-30 20:58:51 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-30 20:58:51 -0800
commit3ca0b5ee03dcbe55733f1624c7d84140b255d94a (patch)
tree6f4175ea983c68aeafb13007f56f86d3d115d439
parent3a0e36b0ac94a40d66ab4c3ab27197d0be2dee76 (diff)
Make sparse pick up the gcc internal include directory automatically.
m68k used to do this by hand, but it really ends up being needed for any environment that does cross-builds, so just do it unconditionally. This should mean that you never need to cross-build sparse or have any other hacks for checking a cross-built environment.
-rw-r--r--arch/m68k/Makefile2
-rw-r--r--scripts/Makefile.build1
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 59c25bc9dafb..466e7407afc7 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3
LDFLAGS_vmlinux = -N
endif
-CHECKFLAGS += -D__mc68000__ -I$(shell $(CC) -print-file-name=include)
+CHECKFLAGS += -D__mc68000__
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 672b0082e21f..9ed771f02846 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -83,6 +83,7 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
# Linus' kernel sanity checking tool
ifneq ($(KBUILD_CHECKSRC),0)
+ CHECKFLAGS += -I$(shell $(CC) -print-file-name=include)
ifeq ($(KBUILD_CHECKSRC),2)
quiet_cmd_force_checksrc = CHECK $<
cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;