[PATCH 2/5] kbuild: remove dead code for modpost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 Makefile | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/Makefile b/Makefile
index 1fa09b041360..e9e412af0815 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
 
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux