summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh/gensh4
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-03-10 17:03:49 -0600
committerJoel Sherrill <joel@rtems.org>2016-03-10 18:10:18 -0600
commitdd642034870b1d6f80c847145a86f8eb87f3757c (patch)
treeb45f2c51c312e8b7f6296c744645ef939871cbbb /c/src/lib/libbsp/sh/gensh4
parentsh/gensh2: Add per-section compilation and linking support (diff)
downloadrtems-dd642034870b1d6f80c847145a86f8eb87f3757c.tar.bz2
sh/gensh4: Add per-section compilation and linking support
updates #2577. For the gensh4 BSP variant without this option sample executables sizes were as follows: text data bss dec hex filename 75538 10666 7264 93468 16d1c ticker.exe 21810 6166 3008 30984 7908 minimum.exe 424370 69762 20476 514608 7da30 fileio.exe 342538 50782 36468 429788 68edc pppd.exe 150930 23130 10168 184228 2cfa4 capture.exe 90578 11078 7348 109004 1a9cc nsecs.exe 125010 22190 7824 155024 25d90 paranoia.exe 153282 26686 8328 188296 2df88 cdtest.exe 73426 10498 7232 91156 16414 base_sp.exe 75186 10734 11072 96992 17ae0 unlimited.exe 85650 9070 7224 101944 18e38 hello.exe 212390 22942 14556 249888 3d020 loopback.exe For the gensh4 BSP variant with this option sample executables sizes were as follows: text data bss dec hex filename 70418 10214 7228 87860 15734 ticker.exe 14514 4886 2984 22384 5770 minimum.exe 411234 67894 20184 499312 79e70 fileio.exe 309906 43666 35668 389240 5f078 pppd.exe 143074 22414 10132 175620 2ae04 capture.exe 86130 10606 7312 104048 19670 nsecs.exe 118978 21714 7804 148496 24410 paranoia.exe 147778 15814 8292 171884 29f6c cdtest.exe 67890 10042 7196 85128 14c88 base_sp.exe 69010 10254 11036 90300 160bc unlimited.exe 78850 8578 7204 94632 171a8 hello.exe 189586 17346 14392 221324 3608c loopback.exe
Diffstat (limited to 'c/src/lib/libbsp/sh/gensh4')
-rw-r--r--c/src/lib/libbsp/sh/gensh4/make/custom/gensh4.cfg5
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sh/gensh4/make/custom/gensh4.cfg b/c/src/lib/libbsp/sh/gensh4/make/custom/gensh4.cfg
index dd1a9f7341..4eb20f9612 100644
--- a/c/src/lib/libbsp/sh/gensh4/make/custom/gensh4.cfg
+++ b/c/src/lib/libbsp/sh/gensh4/make/custom/gensh4.cfg
@@ -23,4 +23,7 @@ RTEMS_CPU_MODEL=sh7750
CPU_CFLAGS = -m4 -ml
# optimize flag: typically -O2
-CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections