* [PATCH] kbuild: drop duplicate CONFIG_LD_DEAD_CODE_DATA_ELIMINATION block
@ 2026-08-24 7:28 Ahmad Fatoum
2026-08-24 12:14 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-08-24 7:28 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
From: Ahmad Fatoum <a.fatoum@barebox.org>
Commit 48d0d0cc28ed ("kbuild: sync with Linux v6.17") carried over an
upstream hunk that sets up section garbage collection a second time,
so we have the hunk being deleted here in addition to:
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_barebox += --gc-sections
LDFLAGS_pbl += --gc-sections
endif
The upstream hunk is incorrect and incomplete: We have no vmlinux and
KBUILD_CFLAGS_KERNEL doesn't apply to the PBL, unlike KBUILD_CPPFLAGS,
therefore delete the duplicate.
Fixes: 48d0d0cc28ed ("kbuild: sync with Linux v6.17")
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
Makefile | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Makefile b/Makefile
index 1a10628f101f..69484534bc6c 100644
--- a/Makefile
+++ b/Makefile
@@ -881,11 +881,6 @@ ifdef CONFIG_ZERO_CALL_USED_REGS
KBUILD_CFLAGS += -fzero-call-used-regs=used-gpr
endif
-ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
-KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
-LDFLAGS_vmlinux += --gc-sections
-endif
-
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-24 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-24 7:28 [PATCH] kbuild: drop duplicate CONFIG_LD_DEAD_CODE_DATA_ELIMINATION block Ahmad Fatoum
2026-08-24 12:14 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox