* [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build
@ 2025-11-10 16:43 Rahul Pathak
2025-12-01 6:02 ` Anup Patel
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Pathak @ 2025-11-10 16:43 UTC (permalink / raw)
To: opensbi; +Cc: rpathak, rahul
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build
2025-11-10 16:43 [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build Rahul Pathak
@ 2025-12-01 6:02 ` Anup Patel
0 siblings, 0 replies; 2+ messages in thread
From: Anup Patel @ 2025-12-01 6:02 UTC (permalink / raw)
To: Rahul Pathak; +Cc: opensbi, rahul
On Mon, Nov 10, 2025 at 10:14 PM Rahul Pathak <rpathak@ventanamicro.com> wrote:
>
> 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>
LGTM.
Reviewed-by: Anup Patel <anup@brainfault.org>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
> ---
> 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
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-01 6:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 16:43 [PATCH] Makefile: Only enable --print-gc-section for verbose(V=1) build Rahul Pathak
2025-12-01 6:02 ` Anup Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox