[rtems commit] powerpc/haleakala: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 20:48:38 UTC 2016
Module: rtems
Branch: master
Commit: 4e98ffa0ca651717413fbf3d0b2acd03059dc1d3
Changeset: http://git.rtems.org/rtems/commit/?id=4e98ffa0ca651717413fbf3d0b2acd03059dc1d3
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 18:42:55 2016 +0000
powerpc/haleakala: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
131684 1996 10076 143756 2318c base_sp.exe
146568 1964 9684 158216 26a08 hello.exe
58268 1456 6076 65800 10108 minimum.exe
644900 5932 22332 673164 a458c fileio.exe
156052 2088 10180 168320 29180 nsecs.exe
229652 2372 10744 242768 3b450 paranoia.exe
135908 2004 10108 148020 24234 ticker.exe
134132 2020 13500 149652 24894 unlimited.exe
1094228 2656 17360 1114244 110084 cxx_iostream.exe
257588 2564 10332 270484 42094 cdtest.exe
247588 2488 11904 261980 3ff5c capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
115628 1956 10024 127608 1f278 base_sp.exe
127884 1904 9592 139380 22074 hello.exe
44044 1396 6024 51464 c908 minimum.exe
617276 5896 22020 645192 9d848 fileio.exe
141580 2056 10128 153764 258a4 nsecs.exe
213452 2332 10688 226472 374a8 paranoia.exe
120940 1968 10056 132964 20764 ticker.exe
115948 1972 13440 131360 20120 unlimited.exe
224884 1984 10048 236916 39d74 cxx_iostream.exe
233696 2068 10280 246044 3c11c cdtest.exe
229292 2424 11852 243568 3b770 capture.exe
---
c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg b/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
index 67ffe58..e43b739 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
+++ b/c/src/lib/libbsp/powerpc/haleakala/make/custom/haleakala.cfg
@@ -17,6 +17,9 @@ CPU_CFLAGS = -mcpu=405 -Dppc405
# -O4 is ok for RTEMS
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V = -O1 -g
+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