mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-12-08 01:11:19 +00:00
Makefile: Only enable --print-gc-section for verbose (V=1) build
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> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251110164352.163801-1-rpathak@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
5
Makefile
5
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))
|
||||
|
||||
Reference in New Issue
Block a user