summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-03-10 20:28:13 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-11 16:11:39 +0100
commit9e4fc459e1429ffa73122ef8ecce6f1739806540 (patch)
treea093c54c19a27e6d60d840de8c105cbf23e4eae3 /Makefile
parentc08a47095fc459829bf870dfcaf2be806e55f5b3 (diff)
downloadbarebox-9e4fc459e1429ffa73122ef8ecce6f1739806540.tar.gz
barebox-9e4fc459e1429ffa73122ef8ecce6f1739806540.tar.xz
kbuild: remove dead code for modpost
rule_barebox-modpost is dead code since it is not invoked by anyone. $(call barebox-modpost) is dead code too since there is no variable named 'barebox-modpost'. We could fix it to $(call rule_barebox-modpost) to invoke the rules, but I hesitate to enable the code that has never been tested. barebox-init, barebox-main are not set by anyone, so this code does not seem to work. The code is completely out of sync from the upstream Linux, so there is no good reason to keep this rotten code. If barebox needs modpost, this should be re-implemented correctly. (preferably, by re-syncing with the latest Linux) Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 0 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 1fa09b0413..e9e412af08 100644
--- a/Makefile
+++ b/Makefile
@@ -716,19 +716,6 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
endif # ifdef CONFIG_KALLSYMS
-# Do modpost on a prelinked vmlinux. The finally linked vmlinux has
-# relevant sections renamed as per the linker script.
-quiet_cmd_barebox-modpost = LD $@
- cmd_barebox-modpost = $(LD) $(LDFLAGS) -r -o $@ \
- $(vmlinux-init) --start-group $(barebox-main) --end-group \
- $(filter-out $(barebox-init) $(barebox-main) $(barebox-lds) FORCE ,$^)
-define rule_barebox-modpost
- :
- +$(call cmd,barebox-modpost)
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
- $(Q)echo 'cmd_$@ := $(cmd_barebox-modpost)' > $(dot-target).cmd
-endef
-
OBJCOPYFLAGS_barebox.bin = -O binary
barebox.bin: barebox FORCE
@@ -782,7 +769,6 @@ endif
# barebox image
barebox: $(barebox-lds) $(barebox-common) $(kallsyms.o) FORCE
- $(call barebox-modpost)
$(call if_changed_rule,barebox__)
$(Q)rm -f .old_version