[rtems commit] m68k/mcf5329: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 03:04:43 UTC 2016
Module: rtems
Branch: master
Commit: 516dab50ec17e2a27c61d2113318dfdff2bcd7c8
Changeset: http://git.rtems.org/rtems/commit/?id=516dab50ec17e2a27c61d2113318dfdff2bcd7c8
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:35 2016 +0000
m68k/mcf5329: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
96854 1680 10554 109088 1aa20 base_sp.exe
110310 1648 10106 122064 1dcd0 hello.exe
34438 1232 4922 40592 9e90 minimum.exe
574374 5584 22042 602000 92f90 fileio.exe
115542 1760 10666 127968 1f3e0 nsecs.exe
196470 2048 11162 209680 33310 paranoia.exe
100582 1680 10586 112848 1b8d0 ticker.exe
98598 1712 13946 114256 1be50 unlimited.exe
868902 21952 17610 908464 ddcb0 cxx_iostream.exe
204726 2272 10730 217728 35280 cdtest.exe
198278 2176 12378 212832 33f60 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
88646 1648 10506 100800 189c0 base_sp.exe
100502 1600 10042 112144 1b610 hello.exe
25302 1184 4874 31360 7a80 minimum.exe
556838 5568 21722 584128 8e9c0 fileio.exe
107830 1744 10602 120176 1d570 nsecs.exe
187926 2032 11098 201056 31160 paranoia.exe
92534 1648 10522 104704 19900 ticker.exe
89014 1664 13882 104560 19870 unlimited.exe
179254 2192 10330 191776 2ed20 cxx_iostream.exe
188294 2144 10650 201088 31180 cdtest.exe
188070 2128 12330 202528 31720 capture.exe
---
c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg b/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
index e1f5734..f742152 100644
--- a/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
+++ b/c/src/lib/libbsp/m68k/mcf5329/make/custom/mcf5329.cfg
@@ -15,6 +15,9 @@ CPU_CFLAGS = -mcpu=5307
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+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