[rtems commit] m68k/mcf5225x: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 03:07:59 UTC 2016
Module: rtems
Branch: master
Commit: 72757566afd711dec128737e3b51f7c9968771c2
Changeset: http://git.rtems.org/rtems/commit/?id=72757566afd711dec128737e3b51f7c9968771c2
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:35 2016 +0000
m68k/mcf5225x: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
96608 1680 7664 105952 19de0 base_sp.exe
109392 1648 7216 118256 1cdf0 hello.exe
34768 1216 4912 40896 9fc0 minimum.exe
115392 1760 7776 124928 1e800 nsecs.exe
195040 2048 8272 205360 32230 paranoia.exe
100336 1680 7696 109712 1ac90 ticker.exe
98336 1712 11056 111104 1b200 unlimited.exe
203472 2272 7840 213584 34250 cdtest.exe
196992 2176 9488 208656 32f10 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
88688 1648 7616 97952 17ea0 base_sp.exe
99760 1600 7152 108512 1a7e0 hello.exe
22864 1184 4864 28912 70f0 minimum.exe
107984 1728 7712 117424 1cab0 nsecs.exe
186672 2032 8208 196912 30130 paranoia.exe
92592 1648 7632 101872 18df0 ticker.exe
89056 1664 10992 101712 18d50 unlimited.exe
187200 2144 7760 197104 301f0 cdtest.exe
186960 2128 9440 198528 30780 capture.exe
---
c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
index 90e76e2..b53b214 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
+++ b/c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg
@@ -16,7 +16,9 @@ CPU_CFLAGS = -mcpu=52235 $(PROJECT_FLAGS)
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -fomit-frame-pointer
-#CFLAGS_OPTIMIZE_V = -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
# This defines the operations performed on the linked executable.
# is currently required.
More information about the vc
mailing list