summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-23 02:07:35 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-22 20:12:58 -0600
commit7e21264349ee97698d19399a482512d3359c185c (patch)
tree60a4d7aedaac3e2dd2ea835f8408c50b78d9385e
parentf0cb2e19c987ea3d7bd19a9a0d9f1f1a1c86df49 (diff)
downloadrtems-7e21264349ee97698d19399a482512d3359c185c.tar.bz2
m68k/uC5282: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 148368 1680 11616 161664 27780 base_sp.exe 137952 1648 11616 151216 24eb0 hello.exe 129472 1568 7968 139008 21f00 minimum.exe 582896 5584 23088 611568 954f0 fileio.exe 162080 1760 11712 175552 2adc0 nsecs.exe 223104 2048 12208 237360 39f30 paranoia.exe 152112 1680 11632 165424 28630 ticker.exe 152016 1712 15456 169184 294e0 unlimited.exe 892672 21936 18720 933328 e3dd0 cxx_iostream.exe 223904 2272 11792 237968 3a190 cdtest.exe 202832 2176 13424 218432 35540 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 122368 1648 9488 133504 20980 base_sp.exe 108576 1600 9024 119200 1d1a0 hello.exe 82032 1328 3904 87264 154e0 minimum.exe 562800 5568 20704 589072 8fd10 fileio.exe 141696 1744 9600 153040 255d0 nsecs.exe 196544 2032 10080 208656 32f10 paranoia.exe 126256 1648 9520 137424 218d0 ticker.exe 122960 1664 12864 137488 21910 unlimited.exe 203024 2208 9328 214560 34620 cxx_iostream.exe 205616 2144 9648 217408 35140 cdtest.exe 190576 2128 11312 204016 31cf0 capture.exe
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg b/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
index 3c62a17c20..c94e236f83 100644
--- a/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
+++ b/c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=5282
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
$(default-bsp-post-link)