[rtems commit] m68k/csb360: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 02:37:26 UTC 2016
Module: rtems
Branch: master
Commit: 8d8d5b4896d256e73e07a65602db988d2cb1db80
Changeset: http://git.rtems.org/rtems/commit/?id=8d8d5b4896d256e73e07a65602db988d2cb1db80
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:34 2016 +0000
m68k/csb360: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
87040 1728 7824 96592 17950 base_sp.exe
96176 1696 7424 105296 19b50 hello.exe
30672 1280 3888 35840 8c00 minimum.exe
559904 5632 19312 584848 8ec90 fileio.exe
106144 1808 7936 115888 1c4b0 nsecs.exe
180688 2096 8416 191200 2eae0 paranoia.exe
90784 1728 7856 100368 18810 ticker.exe
89248 1760 11264 102272 18f80 unlimited.exe
835456 21520 14896 871872 d4dc0 cxx_iostream.exe
186336 2144 7968 196448 2ff60 cdtest.exe
180544 2224 9648 192416 2efa0 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
78496 1648 7760 87904 15760 base_sp.exe
86560 1600 7344 95504 17510 hello.exe
23360 1184 3840 28384 6ee0 minimum.exe
542624 5568 18976 567168 8a780 fileio.exe
98752 1744 7872 108368 1a750 nsecs.exe
171792 2032 8368 182192 2c7b0 paranoia.exe
83040 1648 7792 92480 16940 ticker.exe
79984 1664 11184 92832 16aa0 unlimited.exe
162128 2112 7616 171856 29f50 cxx_iostream.exe
169856 2048 7888 179792 2be50 cdtest.exe
169904 2128 9584 181616 2c570 capture.exe
---
c/src/lib/libbsp/m68k/csb360/make/custom/csb360.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/csb360/make/custom/csb360.cfg b/c/src/lib/libbsp/m68k/csb360/make/custom/csb360.cfg
index dc8988d..0d00237 100644
--- a/c/src/lib/libbsp/m68k/csb360/make/custom/csb360.cfg
+++ b/c/src/lib/libbsp/m68k/csb360/make/custom/csb360.cfg
@@ -15,3 +15,6 @@ CPU_CFLAGS = -mcpu=5272
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list