[rtems commit] m68k/uC5282: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 02:13:11 UTC 2016
Module: rtems
Branch: master
Commit: 7e21264349ee97698d19399a482512d3359c185c
Changeset: http://git.rtems.org/rtems/commit/?id=7e21264349ee97698d19399a482512d3359c185c
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:35 2016 +0000
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
---
c/src/lib/libbsp/m68k/uC5282/make/custom/uC5282.cfg | 3 +++
1 file changed, 3 insertions(+)
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 3c62a17..c94e236 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)
More information about the vc
mailing list