From: Masahiro Yamada <masahiroy@kernel.org>
To: barebox@lists.infradead.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 2/5] kbuild: remove dead code for modpost
Date: Tue, 10 Mar 2020 20:28:13 +0900 [thread overview]
Message-ID: <20200310112816.7415-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20200310112816.7415-1-masahiroy@kernel.org>
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>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-03-10 11:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 11:28 [PATCH 1/5] kbuild: remove unused barebox-head Masahiro Yamada
2020-03-10 11:28 ` Masahiro Yamada [this message]
2020-03-10 11:28 ` [PATCH 3/5] kbuild: rename barebox-pbl-common to BAREBOX_PBL_OBJS Masahiro Yamada
2020-03-10 11:28 ` [PATCH 4/5] kbuild: rename barebox-{common, lds} to BAREBOX_{OBJS, LDS} Masahiro Yamada
2020-03-10 11:28 ` [PATCH 5/5] kbuild: replace barebox-all with BAREBOX_OBJS Masahiro Yamada
2020-03-11 15:11 ` [PATCH 1/5] kbuild: remove unused barebox-head Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200310112816.7415-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox