summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-23 18:35:51 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-23 13:57:48 -0600
commit005c3547061517f0dd823325ea64ed4223807b25 (patch)
tree97f621497d04c7312d8c1c02471799f465db7ae7
parentpowerpc/t32mppc: Add per-section compilation and linking support. (diff)
downloadrtems-005c3547061517f0dd823325ea64ed4223807b25.tar.bz2
powerpc/virtex: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 136928 2284 134078500 134217712 7fffff0 base_sp.exe 152124 2168 134063412 134217704 7ffffe8 hello.exe 96317 1892 134119500 134217709 7ffffed minimum.exe 658001 6274 133553428 134217703 7ffffe7 fileio.exe 161562 2380 134053772 134217714 7fffff2 nsecs.exe 229008 2668 133986040 134217716 7fffff4 paranoia.exe 140224 2292 134075204 134217720 7fffff8 ticker.exe 139564 2308 134075836 134217708 7ffffec unlimited.exe 951004 147150 133119544 134217698 7ffffe2 cxx_iostream.exe 256264 9352 133952104 134217720 7fffff8 cdtest.exe 254760 2788 133960156 134217704 7ffffe8 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 123180 2268 134092272 134217720 7fffff8 base_sp.exe 136152 2112 134079448 134217712 7fffff0 hello.exe 53640 1560 134162508 134217708 7ffffec minimum.exe 632433 6238 133579016 134217687 7ffffd7 fileio.exe 148538 2364 134066808 134217710 7ffffee nsecs.exe 214540 2644 134000536 134217720 7fffff8 paranoia.exe 126732 2276 134088688 134217696 7ffffe0 ticker.exe 124292 2268 134091136 134217696 7ffffe0 unlimited.exe 608992 50546 133558180 134217718 7fffff6 cxx_iostream.exe 243452 8036 133966228 134217716 7fffff4 cdtest.exe 238360 2740 133976616 134217716 7fffff4 capture.exe
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg b/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
index 8af407292b..05110a2adb 100644
--- a/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
+++ b/c/src/lib/libbsp/powerpc/virtex/make/custom/virtex.cfg
@@ -16,6 +16,9 @@ CPU_CFLAGS = -mcpu=403 -Dppc405 -meabi -msdata=sysv -fno-common
# -O4 is ok for RTEMS
# NOTE: some level of -O may be actually required by inline assembler
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)