summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/lm32
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-03-10 16:04:31 -0600
committerJoel Sherrill <joel@rtems.org>2016-03-10 18:09:16 -0600
commit575883838d702c2be4ddab182b7ca189ebe525e5 (patch)
treebe142773781f6cf76ef4f7a46a76337b34c89a17 /c/src/lib/libbsp/lm32
parentlm32/lm32_evr: Add per-section compilation and linking support (diff)
downloadrtems-575883838d702c2be4ddab182b7ca189ebe525e5.tar.bz2
lm32/lm32_evr: Add per-section compilation and linking support
updates #2577. For the milkymist BSP variant without this option sample executables sizes were as follows: text data bss dec hex filename 101160 9044 13333 123537 1e291 ticker.exe 30888 2676 9169 42733 a6ed minimum.exe 592200 90020 26557 708777 ad0a9 fileio.exe 456048 64528 42565 563141 897c5 pppd.exe 203752 25404 16241 245397 3be95 capture.exe 118216 10704 13437 142357 22c15 nsecs.exe 197848 22468 13981 234297 39339 paranoia.exe 97496 8760 13301 119557 1d305 base_sp.exe 100392 9120 17141 126653 1eebd unlimited.exe 121032 7720 13309 142061 22aed hello.exe 289340 28120 20653 338113 528c1 loopback.exe For the milkymist BSP variant with this option sample executables sizes were as follows: text data bss dec hex filename 93464 8748 13333 115545 1c359 ticker.exe 17144 1308 9133 27585 6bc1 minimum.exe 574024 87296 26301 687621 a7e05 fileio.exe 415668 60652 41837 518157 7e80d pppd.exe 190920 24712 16233 231865 389b9 capture.exe 111800 10404 13405 135609 211b9 nsecs.exe 187272 22064 13949 223285 36835 paranoia.exe 87656 8440 13301 109397 1ab55 base_sp.exe 89048 8736 17149 114933 1c0f5 unlimited.exe 108888 7316 13309 129513 1f9e9 hello.exe 262820 26764 20557 310141 4bb7d loopback.exe
Diffstat (limited to 'c/src/lib/libbsp/lm32')
-rw-r--r--c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg b/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
index ae691eb2a3..97fcb9e033 100644
--- a/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
+++ b/c/src/lib/libbsp/lm32/milkymist/make/custom/milkymist.cfg
@@ -19,6 +19,9 @@ CPU_CFLAGS = -mbarrel-shift-enabled -mmultiply-enabled \
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
$(OBJCOPY) -O binary --strip-all $(basename $@)$(EXEEXT) \