u-boot-brain/arch/sh/config.mk
Marek Vasut 56f01746ab 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>
2020-05-20 13:20:25 +02:00

19 lines
442 B
Makefile

# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2000-2002
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := sh4-linux-
endif
CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000
ifeq ($(CPU),sh2)
LDFLAGS_STANDALONE += -EB
endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_RELFLAGS += -fpic -ffunction-sections -fdata-sections
LDFLAGS_FINAL = --gc-sections
PLATFORM_RELFLAGS += -ffixed-r13