[rtems commit] powerpc/ss555: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 19:41:22 UTC 2016
Module: rtems
Branch: master
Commit: c663474e6b3a2f1380fd986a5ceb3ae824f4c02d
Changeset: http://git.rtems.org/rtems/commit/?id=c663474e6b3a2f1380fd986a5ceb3ae824f4c02d
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 18:31:10 2016 +0000
powerpc/ss555: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
124540 1884 9068 135492 21144 base_sp.exe
133264 1832 9072 144168 23328 hello.exe
82948 1620 5816 90384 16110 minimum.exe
637608 5824 21344 664776 a24c8 fileio.exe
148908 1980 9188 160076 2714c nsecs.exe
191988 2260 9712 203960 31cb8 paranoia.exe
127820 1892 9116 138828 21e4c ticker.exe
127484 1884 12908 142276 22bc4 unlimited.exe
1056184 22308 16356 1094848 10b4c0 cxx_iostream.exe
244272 2852 9336 256460 3e9cc cdtest.exe
236156 2380 10896 249432 3ce58 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
98616 1808 8984 109408 1ab60 base_sp.exe
104960 1732 8576 115268 1c244 hello.exe
40124 1284 5048 46456 b578 minimum.exe
602352 5752 20988 629092 99964 fileio.exe
124632 1912 9120 135664 211f0 nsecs.exe
165276 2192 9644 177112 2b3d8 paranoia.exe
103548 1824 9012 114384 1bed0 ticker.exe
100676 1808 12452 114936 1c0f8 unlimited.exe
201480 2380 9056 212916 33fb4 cxx_iostream.exe
210304 2284 9232 221820 3627c cdtest.exe
209316 2288 10832 222436 364e4 capture.exe
---
c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg b/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
index cde7f4a..fab4817 100644
--- a/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
+++ b/c/src/lib/libbsp/powerpc/ss555/make/custom/ss555.cfg
@@ -20,6 +20,9 @@ CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL)
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
$(default-bsp-post-link)
More information about the vc
mailing list