summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-23 18:28:42 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-23 13:35:38 -0600
commitcfd033679dfd20e4a07953b68560c9c26e787e43 (patch)
tree3e75172017ecc4b7b0705ac3bf86921ac75ffe25
parentpowerpc/mvme5500: Add per-section compilation and linking support. (diff)
downloadrtems-cfd033679dfd20e4a07953b68560c9c26e787e43.tar.bz2
powerpc/qemuppc: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 119012 8704 15168 142884 22e24 base_sp.exe 128516 7612 15104 151232 24ec0 hello.exe 54276 4544 11584 70404 11304 minimum.exe 565444 80124 27456 673024 a4500 fileio.exe 142116 10432 15296 167844 28fa4 nsecs.exe 174276 21308 15808 211392 339c0 paranoia.exe 122180 8896 15200 146276 23b64 ticker.exe 121540 8800 18944 149284 24724 unlimited.exe 1010276 68228 22808 1101312 10ce00 cxx_iostream.exe 228580 20112 15856 264548 40964 cdtest.exe 217348 22620 16992 256960 3ebc0 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 104356 7168 15168 126692 1eee4 base_sp.exe 111780 6080 15072 132932 20744 hello.exe 40836 3008 11584 55428 d884 minimum.exe 540900 76640 27168 644708 9d664 fileio.exe 128228 8896 15264 152388 25344 nsecs.exe 159044 19744 15776 194564 2f804 paranoia.exe 107812 7328 15200 130340 1fd24 ticker.exe 105380 7296 18912 131588 20204 unlimited.exe 199644 15296 15528 230468 38444 cxx_iostream.exe 206772 16800 15376 238948 3a564 cdtest.exe 200228 20864 16992 238084 3a204 capture.exe
-rw-r--r--c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg b/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
index b768855588..81d49f97dc 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
+++ b/c/src/lib/libbsp/powerpc/qemuppc/make/custom/qemuppc.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=603e -Dppc603e
# 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)