[rtems commit] m68k/mcf5225x: Add per-section compilation and linking support(GCI 2018)

Joel Sherrill joel at rtems.org
Thu Nov 29 00:58:18 UTC 2018


Module:    rtems
Branch:    master
Commit:    9c4dc7b01fd6d5d77235a0177fd6761c4ba2f87e
Changeset: http://git.rtems.org/rtems/commit/?id=9c4dc7b01fd6d5d77235a0177fd6761c4ba2f87e

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Thu Nov 29 01:55:41 2018 +0530

m68k/mcf5225x: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
  71984    1104    4080   77168   12d70 ./base_sp.exe
 201872    2112    8944  212928   33fc0 ./capture.exe
 104464    1472    4192  110128   1ae30 ./hello.exe
 249584    5984   10864  266432   410c0 ./loopback.exe
  40032     304    2768   43104    a860 ./minimum.exe
  95360    1584    4208  101152   18b20 ./nsecs.exe
 179760    1872    4816  186448   2d850 ./paranoia.exe
 432912   12048   35568  480528   75510 ./pppd.exe
  74992    1136    4112   80240   13970 ./ticker.exe
  74832    1088    7952   83872   147a0 ./unlimited.exe

The size of the sample executables with this option were:

   text    data     bss     dec     hex filename
  67456    1104    4000   72560   11b70 ./base_sp.exe
 188272    2096    8912  199280   30a70 ./capture.exe
  95536    1472    4160  101168   18b30 ./hello.exe
 233568    5984   10784  250336   3d1e0 ./loopback.exe
  39264     304    2736   42304    a540 ./minimum.exe
  89392    1584    4128   95104   17380 ./nsecs.exe
 171120    1872    4784  177776   2b670 ./paranoia.exe
 420336   12048   35488  467872   723a0 ./pppd.exe
  70208    1136    4032   75376   12670 ./ticker.exe
  73152    1088    7920   82160   140f0 ./unlimited.exe

Closes #2568

---

 bsps/m68k/mcf5225x/config/mcf5225x.cfg | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/bsps/m68k/mcf5225x/config/mcf5225x.cfg b/bsps/m68k/mcf5225x/config/mcf5225x.cfg
index d195e46..7d2fe0b 100644
--- a/bsps/m68k/mcf5225x/config/mcf5225x.cfg
+++ b/bsps/m68k/mcf5225x/config/mcf5225x.cfg
@@ -10,16 +10,15 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
 RTEMS_BSP_FAMILY=mcf5225x
 
 #  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 $(PROJECT_FLAGS)
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -fomit-frame-pointer
 
-# FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2568.
 # 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.



More information about the vc mailing list