summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2020-05-03 17:22:43 +0200
committerMarek Vasut <marek.vasut+renesas@gmail.com>2020-05-09 23:12:39 +0200
commit58d8c88ff81b4532f8f5884fe4138639c966bc84 (patch)
treeebaaa73ca5e3910139e0c4a9f36fb62c11b901bf
parent8fe829e9b073d4a8c075d18845f47b3441fde931 (diff)
downloadu-boot-58d8c88ff81b4532f8f5884fe4138639c966bc84.tar.gz
sh: Enable ffunction-sections and fdata-sections
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>
-rw-r--r--arch/sh/config.mk2
1 files changed, 1 insertions, 1 deletions
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