From 8b28fddf477b36d312054a8c4c2814077e1ff1af Mon Sep 17 00:00:00 2001 From: Shashvat Jain Date: Thu, 29 Nov 2018 15:39:47 -0500 Subject: m68k/mrm332: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 172384 2096 14512 188992 2e240 ./capture.exe 70848 1136 11568 83552 14660 ./base_sp.exe 101728 1504 11728 114960 1c110 ./hello.exe 217744 6016 18336 242096 3b1b0 ./loopback.exe 57968 1008 8416 67392 10740 ./minimum.exe 93952 1616 11696 107264 1a300 ./nsecs.exe 166272 1904 12304 180480 2c100 ./paranoia.exe 358240 12032 41136 411408 64710 ./pppd.exe 73104 1168 11600 85872 14f70 ./ticker.exe 73264 1120 15472 89856 15f00 ./unlimited.exe The size of the sample executables with this option were: text data bss dec hex filename 158976 2096 14464 175536 2adb0 ./capture.exe 66304 1136 11488 78928 13450 ./base_sp.exe 92912 1504 11680 106096 19e70 ./hello.exe 202240 6000 18272 226512 374d0 ./loopback.exe 53296 992 8336 62624 f4a0 ./minimum.exe 88032 1616 11600 101248 18b80 ./nsecs.exe 157760 1888 12272 171920 29f90 ./paranoia.exe 346080 12032 41056 399168 61740 ./pppd.exe 68304 1168 11520 80992 13c60 ./ticker.exe 71312 1104 15440 87856 15730 ./unlimited.exe Closes #2567 --- bsps/m68k/mrm332/config/mrm332.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bsps') diff --git a/bsps/m68k/mrm332/config/mrm332.cfg b/bsps/m68k/mrm332/config/mrm332.cfg index 7df1c189fa..5391f6607f 100644 --- a/bsps/m68k/mrm332/config/mrm332.cfg +++ b/bsps/m68k/mrm332/config/mrm332.cfg @@ -13,7 +13,6 @@ CPU_CFLAGS = -mcpu=cpu32 # using optimise for size due to small memory on target board. CFLAGS_OPTIMIZE_V = -Os -g -fomit-frame-pointer -# FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2567. # 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 -- cgit v1.2.3