summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-23 02:07:35 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-22 21:15:01 -0600
commit01835fd6fef455232e480721fa686dfc1cf570f3 (patch)
treefc1f0a3ca4b330545df7485a022b6e1f9fab56c5
parenta030ce5f534c6b5b1de240afe2d1c56455b48cb1 (diff)
downloadrtems-01835fd6fef455232e480721fa686dfc1cf570f3.tar.bz2
m68k/mvme147: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 79696 1600 32144 113440 1bb20 base_sp.exe 89008 1584 31728 122320 1ddd0 hello.exe 36512 1184 28480 66176 10280 minimum.exe 523824 5520 43632 572976 8be30 fileio.exe 98832 1696 32256 132784 206b0 nsecs.exe 146736 1984 32736 181456 2c4d0 paranoia.exe 84016 1616 32176 117808 1cc30 ticker.exe 82384 1632 35584 119600 1d330 unlimited.exe 828000 21408 39216 888624 d8f30 cxx_iostream.exe 178832 2032 32288 213152 340a0 cdtest.exe 173088 2112 33968 209168 33110 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 72864 1584 32080 106528 1a020 base_sp.exe 81200 1536 31664 114400 1bee0 hello.exe 29792 1152 28432 59376 e7f0 minimum.exe 508480 5504 43296 557280 880e0 fileio.exe 93024 1680 32192 126896 1efb0 nsecs.exe 139520 1952 32672 174144 2a840 paranoia.exe 77920 1600 32112 111632 1b410 ticker.exe 74896 1600 35504 112000 1b580 unlimited.exe 156224 2048 31936 190208 2e700 cxx_iostream.exe 164032 1984 32192 198208 30640 cdtest.exe 164144 2064 33904 200112 30db0 capture.exe
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg b/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
index 988058748e..8e925cbd41 100644
--- a/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
+++ b/c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=68030
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
$(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec