aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-05-31 16:28:40 -0400
committerSam Ravnborg <sam@ravnborg.org>2008-05-31 16:28:40 -0400
commit96d97f262aa6120f8dd8e8e9c7a0b0677de7e29e (patch)
treec62eafe92785611555d0385771e2306a4bc94226 /scripts/Makefile.modpost
parent73531905ed53576d9e8707659a761e7046a60497 (diff)
kbuild: fix $(src) assignmnet with external modules
When we introduced support for KBUILD_EXTRA_SYMBOLS we started to include the externam module's kbuild file when doing the final modpost step. As external modules often do: ccflags-y := -I$(src) We had problems because $(src) was unassinged and gcc then used the next parameter for -I resulting in strange build failures. Fix is to assign $(src) and $(obj) when building external modules. This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tvrtko <tvrtko.ursulin@sophos.com> Cc: Andrea Arcangeli <andrea@qumranet.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r--scripts/Makefile.modpost6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index a098a0454dc8..17092d6c7db3 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,7 +43,13 @@ _modpost: __modpost
43include include/config/auto.conf 43include include/config/auto.conf
44include scripts/Kbuild.include 44include scripts/Kbuild.include
45 45
46# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info
46ifneq ($(KBUILD_EXTMOD),) 47ifneq ($(KBUILD_EXTMOD),)
48
49# set src + obj - they may be used when building the .mod.c file
50obj := $(KBUILD_EXTMOD)
51src := $(obj)
52
47# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS 53# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
48include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ 54include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
49 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) 55 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)