[rtems commit] m68k/mcf5235: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 03:02:11 UTC 2016
Module: rtems
Branch: master
Commit: 535e5da90ca348f92557c687a571c4ef87acaaf6
Changeset: http://git.rtems.org/rtems/commit/?id=535e5da90ca348f92557c687a571c4ef87acaaf6
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:35 2016 +0000
m68k/mcf5235: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
92512 1680 9472 103664 194f0 base_sp.exe
106960 1648 9072 117680 1cbb0 hello.exe
31408 1216 3888 36512 8ea0 minimum.exe
570464 5584 20960 597008 91c10 fileio.exe
111312 1760 9584 122656 1df20 nsecs.exe
192048 2048 10064 204160 31d80 paranoia.exe
96256 1680 9504 107440 1a3b0 ticker.exe
94800 1696 12912 109408 1ab60 unlimited.exe
865200 21936 16576 903712 dca20 cxx_iostream.exe
200480 2256 9648 212384 33da0 cdtest.exe
194000 2176 11296 207472 32a70 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
83392 1632 9408 94432 170e0 base_sp.exe
96880 1584 9008 107472 1a3d0 hello.exe
22912 1184 3840 27936 6d20 minimum.exe
552144 5552 20624 578320 8d310 fileio.exe
103328 1728 9520 114576 1bf90 nsecs.exe
182592 2016 10000 194608 2f830 paranoia.exe
87920 1648 9440 99008 182c0 ticker.exe
84944 1664 12848 99456 18480 unlimited.exe
175248 2192 9296 186736 2d970 cxx_iostream.exe
183120 2128 9568 194816 2f900 cdtest.exe
182896 2112 11232 196240 2fe90 capture.exe
---
c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg b/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
index b5c3c49..f3a0861 100644
--- a/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
+++ b/c/src/lib/libbsp/m68k/mcf5235/make/custom/mcf5235.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=5235
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
ifndef MTARGET
MTARGET=ram
More information about the vc
mailing list