Commit 114f5157 authored by Roland McGrath's avatar Roland McGrath Committed by Sam Ravnborg

kbuild: use LDFLAGS_MODULE only for .ko links

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: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 1edf1c00
...@@ -299,7 +299,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(C ...@@ -299,7 +299,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(C
MODFLAGS = -DMODULE MODFLAGS = -DMODULE
CFLAGS_MODULE = $(MODFLAGS) CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS)
LDFLAGS_MODULE = -r LDFLAGS_MODULE =
CFLAGS_KERNEL = CFLAGS_KERNEL =
AFLAGS_KERNEL = AFLAGS_KERNEL =
......
...@@ -315,7 +315,7 @@ quiet_cmd_link_multi-y = LD $@ ...@@ -315,7 +315,7 @@ quiet_cmd_link_multi-y = LD $@
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)
quiet_cmd_link_multi-m = LD [M] $@ 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 # We would rather have a list of rules like
# foo.o: $(foo-objs) # foo.o: $(foo-objs)
......
...@@ -98,7 +98,7 @@ targets += $(modules:.ko=.mod.o) ...@@ -98,7 +98,7 @@ targets += $(modules:.ko=.mod.o)
# Step 6), final link of the modules # Step 6), final link of the modules
quiet_cmd_ld_ko_o = LD [M] $@ 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,$^) $(filter-out FORCE,$^)
$(modules): %.ko :%.o %.mod.o FORCE $(modules): %.ko :%.o %.mod.o FORCE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment