From: Rahul Pathak <rpathak@ventanamicro.com>
To: opensbi@lists.infradead.org
Cc: rpathak@ventanamicro.com, rahul@summations.net
Subject: [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build
Date: Mon, 10 Nov 2025 22:13:52 +0530 [thread overview]
Message-ID: <20251110164352.163801-1-rpathak@ventanamicro.com> (raw)
Earlier this option was enabled during
debug build which only prints the linker logs
of removing the unused sections. Instead
enable this for V=1 and keep the debug build
clean.
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
---
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 398eabe8c964..da7976d5efbb 100644
--- a/Makefile
+++ b/Makefile
@@ -444,11 +444,14 @@ DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-builtin -D__DTS__ -x assemble
ifneq ($(DEBUG),)
CFLAGS += -O0
-ELFFLAGS += -Wl,--print-gc-sections
else
CFLAGS += -O2
endif
+ifeq ($(V), 1)
+ELFFLAGS += -Wl,--print-gc-sections
+endif
+
# Setup functions for compilation
define dynamic_flags
-I$(shell dirname $(2)) -D__OBJNAME__=$(subst -,_,$(shell basename $(1) .o))
--
2.48.1
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next reply other threads:[~2025-11-10 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 16:43 Rahul Pathak [this message]
2025-12-01 6:02 ` [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build Anup Patel
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=20251110164352.163801-1-rpathak@ventanamicro.com \
--to=rpathak@ventanamicro.com \
--cc=opensbi@lists.infradead.org \
--cc=rahul@summations.net \
/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