From 1fe6d1173782770798a309e0047457f261c318ea Mon Sep 17 00:00:00 2001 From: Shashvat Jain Date: Wed, 28 Nov 2018 23:23:36 +0530 Subject: m68k/mcf52235:Add per-section compilation and linking support(GCI 2018) The size of the sample executables without this option were: text data bss dec hex filename 69776 1104 4080 74960 124d0 ./base_sp.exe 103376 1472 4192 109040 1a9f0 ./hello.exe 37808 304 2768 40880 9fb0 ./minimum.exe 93152 1584 4208 98944 18280 ./nsecs.exe 72784 1136 4112 78032 130d0 ./ticker.exe 72608 1088 7952 81648 13ef0 ./unlimited.exe The size of the sample executables with this option were: text data bss dec hex filename 65120 1104 4000 70224 11250 ./base_sp.exe 94448 1472 4160 100080 186f0 ./hello.exe 36928 304 2736 39968 9c20 ./minimum.exe 87072 1584 4128 92784 16a70 ./nsecs.exe 67888 1136 4032 73056 11d60 ./ticker.exe 70816 1088 7920 79824 137d0 ./unlimited.exe Closes #2570 --- bsps/m68k/mcf52235/config/mcf52235.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsps/m68k/mcf52235/config/mcf52235.cfg b/bsps/m68k/mcf52235/config/mcf52235.cfg index bc69711fd7..c0a6090060 100644 --- a/bsps/m68k/mcf52235/config/mcf52235.cfg +++ b/bsps/m68k/mcf52235/config/mcf52235.cfg @@ -7,7 +7,7 @@ RTEMS_CPU=m68k include $(RTEMS_ROOT)/make/custom/default.cfg # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. CPU_CFLAGS = -mcpu=52235 # optimize flag: typically -O2 @@ -15,8 +15,8 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2570. # The following two lines enable compiling and linking on per element. -# CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections -# LDFLAGS = -Wl,--gc-sections +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections +LDFLAGS = -Wl,--gc-sections # This defines the operations performed on the linked executable. # is currently required. -- cgit v1.2.3