aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-05 04:18:41 -0400
committerMichal Marek <mmarek@suse.cz>2012-05-05 15:19:33 -0400
commit1f2bfbd00e466ff3489b2ca5cc75b1cccd14c123 (patch)
tree6c630d3ee90a34d17f85d5c07dde67d4c27883a8 /arch/um
parent95698570510b7be9ab1542a4a908242c05a9b0ed (diff)
kbuild: link of vmlinux moved to a script
Move the final link of vmlinux to a script to improve readability and maintainability of the code. The Makefile fragments used to link vmlinux has over the years seen far too many changes and the logic had become hard to follow. As the process by nature is serialized there was nothing gained including this in the Makefile. "um" has special link requirments - and the only way to handle this was to hard-code the linking of "um" in the script. This was better than trying to modularize it only for the benefit of "um" anyway. The shell script has been improved after input from: Arnaud Lacombe <lacombar@gmail.com> Nick Bowler <nbowler@elliptictech.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Arnaud Lacombe <lacombar@gmail.com> Cc: Nick Bowler <nbowler@elliptictech.com> Cc: Richard Weinberger <richard@nod.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/Makefile11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 55c0661e2b5d..097091059aaa 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -121,15 +121,8 @@ LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
121 121
122LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) 122LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt))
123 123
124CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) 124# Used by link-vmlinux.sh which has special support for um link
125define cmd_vmlinux__ 125export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
126 $(CC) $(CFLAGS_vmlinux) -o $@ \
127 -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \
128 -Wl,--start-group $(vmlinux-main) -Wl,--end-group \
129 -lutil \
130 $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o \
131 FORCE ,$^) ; rm -f linux
132endef
133 126
134# When cleaning we don't include .config, so we don't include 127# When cleaning we don't include .config, so we don't include
135# TT or skas makefiles and don't clean skas_ptregs.h. 128# TT or skas makefiles and don't clean skas_ptregs.h.