[rtems commit] m68k/mvme147: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 03:15:05 UTC 2016
Module: rtems
Branch: master
Commit: 01835fd6fef455232e480721fa686dfc1cf570f3
Changeset: http://git.rtems.org/rtems/commit/?id=01835fd6fef455232e480721fa686dfc1cf570f3
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:35 2016 +0000
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
---
c/src/lib/libbsp/m68k/mvme147/make/custom/mvme147.cfg | 3 +++
1 file changed, 3 insertions(+)
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 9880587..8e925cb 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
More information about the vc
mailing list