[rtems commit] m68k/gen68302: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 02:18:40 UTC 2016
Module: rtems
Branch: master
Commit: 4544ffcd471a6b51fae304ff51cd650bc4792d94
Changeset: http://git.rtems.org/rtems/commit/?id=4544ffcd471a6b51fae304ff51cd650bc4792d94
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:34 2016 +0000
m68k/gen68302: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
78560 1632 12597120 12677312 c170c0 base_sp.exe
93760 1616 12596720 12692096 c1aa80 hello.exe
31024 1216 12593472 12625712 c0a730 minimum.exe
537104 5552 12608608 13151264 c8ac20 fileio.exe
97888 1728 12597232 12696848 c1bd10 nsecs.exe
179888 2016 12597728 12779632 c30070 paranoia.exe
82864 1648 12597152 12681664 c181c0 ticker.exe
81328 1664 12600560 12683552 c18920 unlimited.exe
841296 21520 12604224 13467040 cd7da0 cxx_iostream.exe
187168 2224 12597296 12786688 c31c00 cdtest.exe
181664 2144 12598944 12782752 c30ca0 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
71280 1616 12597056 12669952 c15400 base_sp.exe
85552 1568 12596656 12683776 c18a00 hello.exe
22272 1168 12593408 12616848 c08490 minimum.exe
521808 5520 12608272 13135600 c86ef0 fileio.exe
91696 1696 12597168 12690560 c1a480 nsecs.exe
172256 1984 12597664 12771904 c2e240 paranoia.exe
76336 1616 12597088 12675040 c167e0 ticker.exe
73296 1632 12600496 12675424 c16960 unlimited.exe
163568 2160 12596960 12762688 c2be40 cxx_iostream.exe
171744 2096 12597216 12771056 c2def0 cdtest.exe
172384 2080 12598880 12773344 c2e7e0 capture.exe
---
c/src/lib/libbsp/m68k/gen68302/make/custom/gen68302.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/gen68302/make/custom/gen68302.cfg b/c/src/lib/libbsp/m68k/gen68302/make/custom/gen68302.cfg
index 60bfed7..e60a641 100644
--- a/c/src/lib/libbsp/m68k/gen68302/make/custom/gen68302.cfg
+++ b/c/src/lib/libbsp/m68k/gen68302/make/custom/gen68302.cfg
@@ -14,3 +14,6 @@ CPU_CFLAGS = -mcpu=68302
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list