* [PATCH] sh: Enable ffunction-sections and fdata-sections
@ 2020-05-03 15:26 Marek Vasut
0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2020-05-03 15:26 UTC (permalink / raw)
To: u-boot
Enable these two options to let compiler eliminate unused code.
On R2Dplus, this results in considerable amount of saved space:
text data bss dec hex filename
- 266580 13196 39076 318852 4dd84 u-boot
+ 220214 12797 38745 271756 4258c u-boot
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Tom Rini <trini@konsulko.com>
---
arch/sh/config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 6ef44638ab..85dab383e7 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -13,6 +13,6 @@ LDFLAGS_STANDALONE += -EB
endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
-PLATFORM_RELFLAGS += -fpic
+PLATFORM_RELFLAGS += -fpic -ffunction-sections -fdata-sections
LDFLAGS_FINAL = --gc-sections
PLATFORM_RELFLAGS += -ffixed-r13
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-03 15:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 15:26 [PATCH] sh: Enable ffunction-sections and fdata-sections Marek Vasut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.