summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-23 02:07:35 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-22 21:07:55 -0600
commit72757566afd711dec128737e3b51f7c9968771c2 (patch)
tree634690e23e52b1c5f91a465a4127c52d160b8fba /c
parentm68k/mcf5329: Add per-section compilation and linking support. (diff)
downloadrtems-72757566afd711dec128737e3b51f7c9968771c2.tar.bz2
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
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/m68k/mcf5225x/make/custom/mcf5225x.cfg4
1 files changed, 3 insertions, 1 deletions
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 90e76e2709..b53b214199 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.