mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-28 01:51:25 +02:00
GCC's garbage collector works for Microblaze for quite a long time but none has enabled it. The same change has be done for example by commit fac4790491f6 ("arc: Eliminate unused code and data with GCC's garbage collector"). Before: text data bss dec hex filename 588760 33592 39192 661544 a1828 u-boot After: text data bss dec hex filename 504504 32164 38608 575276 8c72c u-boot Which saves almost 15% of memory footprint. Also group symbols/functions to proper section. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
19 lines
441 B
Makefile
19 lines
441 B
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2007-2008 Michal Simek
|
|
# Michal SIMEK <monstr@monstr.eu>
|
|
#
|
|
# (C) Copyright 2004 Atmark Techno, Inc.
|
|
# Yasushi SHOJI <yashi@atmark-techno.com>
|
|
|
|
CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
|
|
|
|
PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
|
|
PLATFORM_CPPFLAGS += -fdata-sections -ffunction-sections
|
|
|
|
LDFLAGS_FINAL += --gc-sections
|
|
|
|
ifeq ($(CONFIG_SPL_BUILD),)
|
|
PLATFORM_CPPFLAGS += -fPIC
|
|
endif
|