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:10:56 -0600
commita030ce5f534c6b5b1de240afe2d1c56455b48cb1 (patch)
tree0783e843d3e9ce0e24aaf3068b7db532f72bc01a
parentm68k/mcf5225x: Add per-section compilation and linking support. (diff)
downloadrtems-a030ce5f534c6b5b1de240afe2d1c56455b48cb1.tar.bz2
m68k/mrm332: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 78944 1664 17328 97936 17e90 base_sp.exe 93664 1632 16928 112224 1b660 hello.exe 25136 1216 13104 39456 9a20 minimum.exe 98160 1744 17440 117344 1ca60 nsecs.exe 165888 2032 17920 185840 2d5f0 paranoia.exe 81648 1664 17360 100672 18940 ticker.exe 81232 1696 20768 103696 19510 unlimited.exe 180896 2224 17504 200624 30fb0 cdtest.exe 166144 2160 19152 187456 2dc40 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 71456 1632 17264 90352 160f0 base_sp.exe 85328 1584 16848 103760 19550 hello.exe 18736 1168 13056 32960 80c0 minimum.exe 91584 1712 17376 110672 1b050 nsecs.exe 158368 2000 17856 178224 2b830 paranoia.exe 74816 1632 17296 93744 16e30 ticker.exe 73152 1648 20688 95488 17500 unlimited.exe 165760 2112 17424 185296 2d3d0 cdtest.exe 157040 2096 19088 178224 2b830 capture.exe
-rw-r--r--c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
index de07e73786..a0ef592327 100644
--- a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
+++ b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=cpu32
# using optimise for size due to small memory on target board.
CFLAGS_OPTIMIZE_V = -Os -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