]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kbuild: use LDFLAGS_MODULE only for .ko links
authorRoland McGrath <roland@redhat.com>
Mon, 23 Jul 2007 08:12:08 +0000 (01:12 -0700)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 25 Jul 2007 19:18:19 +0000 (21:18 +0200)
Sam Ravnborg pointed out that Documentation/kbuild/makefiles.txt already
says this is what it's for.  This patch makes the reality live up to the
documentation.  This fixes the problem of LDFLAGS_BUILD_ID getting into too
many places.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile
scripts/Makefile.build
scripts/Makefile.modpost

index 23f81c9f698eaf4f6c9c407a926de1fe3b74a9cd..dfe3d1610a7b3a7495507e9e95d6109592be4af1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -299,7 +299,7 @@ CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(C
 MODFLAGS       = -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
-LDFLAGS_MODULE  = -r
+LDFLAGS_MODULE  =
 CFLAGS_KERNEL  =
 AFLAGS_KERNEL  =
 
index 3f7b451f39557a99cfd3a3e600e2f680cb5432b9..7fd6055bedfddc6a6687f1ccc3cced4cab8c3d34 100644 (file)
@@ -315,7 +315,7 @@ quiet_cmd_link_multi-y = LD      $@
 cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)
 
 quiet_cmd_link_multi-m = LD [M]  $@
-cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps)
+cmd_link_multi-m = $(cmd_link_multi-y)
 
 # We would rather have a list of rules like
 #      foo.o: $(foo-objs)
index 1818c502007e89a8ea7a0951ef4c87a54644faf5..d988f5d21e3df12b50e31b9eac86bc21e82b867c 100644 (file)
@@ -98,7 +98,7 @@ targets += $(modules:.ko=.mod.o)
 
 # Step 6), final link of the modules
 quiet_cmd_ld_ko_o = LD [M]  $@
-      cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@           \
+      cmd_ld_ko_o = $(LD) -r $(LDFLAGS) $(LDFLAGS_MODULE) -o $@                \
                          $(filter-out FORCE,$^)
 
 $(modules): %.ko :%.o %.mod.o FORCE