summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-03-10 16:46:02 -0600
committerJoel Sherrill <joel@rtems.org>2016-03-10 18:10:17 -0600
commitfd9ea74c93490cfd38490a7a12d4655d67349f65 (patch)
tree07256b5d2af3c818d37a133938842468b376f8ef /c/src/lib/libbsp/sh
parentor1k/generic_or1k: Add per-section compilation and linking support (diff)
downloadrtems-fd9ea74c93490cfd38490a7a12d4655d67349f65.tar.bz2
sh/gensh1: Add per-section compilation and linking support
updates #2577. For the gensh1 BSP variant without this option sample executables sizes were as follows: text data bss dec hex filename 63586 7626 6788 78000 130b0 ticker.exe 25042 3170 2872 31084 796c minimum.exe 337626 47818 36260 421704 66f48 pppd.exe 141298 20114 9684 171096 29c58 capture.exe 76738 8038 6865 91641 165f9 nsecs.exe 130658 18522 7356 156536 26378 paranoia.exe 144274 22874 7844 174992 2ab90 cdtest.exe 60802 6810 6756 74368 12280 base_sp.exe 63138 7046 10580 80764 13b7c unlimited.exe 77074 5402 6748 89224 15c88 hello.exe 201686 19922 14084 235692 398ac loopback.exe For the gensh1 BSP variant with this option sample executables sizes were as follows: text data bss dec hex filename 59298 7054 6760 73112 11d98 ticker.exe 13490 1502 1844 16836 41c4 minimum.exe 298274 40526 35440 374240 5b5e0 pppd.exe 133634 19278 9664 162576 27b10 capture.exe 73106 7446 6841 87393 15561 nsecs.exe 124562 17926 7320 149808 24930 paranoia.exe 138738 12026 7820 158584 26b78 cdtest.exe 55218 6234 6732 68184 10a58 base_sp.exe 53474 5422 9524 68420 10b44 unlimited.exe 66898 3766 5688 76352 12a40 hello.exe 179362 14206 13924 207492 32a84 loopback.exe
Diffstat (limited to 'c/src/lib/libbsp/sh')
-rw-r--r--c/src/lib/libbsp/sh/gensh1/make/custom/gensh1.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sh/gensh1/make/custom/gensh1.cfg b/c/src/lib/libbsp/sh/gensh1/make/custom/gensh1.cfg
index 4f80115721..fb066eda79 100644
--- a/c/src/lib/libbsp/sh/gensh1/make/custom/gensh1.cfg
+++ b/c/src/lib/libbsp/sh/gensh1/make/custom/gensh1.cfg
@@ -18,3 +18,6 @@ CPU_CFLAGS = -m1
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections