[rtems commit] m68k/gen68360: Add per-section compilation and linking support

Joel Sherrill joel at rtems.org
Sun Nov 25 15:34:58 UTC 2018


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

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Sun Nov 25 13:25:01 2018 +0530

m68k/gen68360:Add per-section compilation and linking support

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
  76560    1200   19504   97264   17bf0 ./base_sp.exe
 191776    2160   22448  216384   34d40 ./capture.exe
 243760    2976   20496  267232   413e0 ./cdtest.exe
 827184   21872   26928  875984   d5dd0 ./cxx_iostream.exe
 532960    4688   31904  569552   8b0d0 ./fileio.exe
  97888    1472   19360  118720   1cfc0 ./hello.exe
 250368    6080   26272  282720   45060 ./loopback.exe
  34336     304   15056   49696    c220 ./minimum.exe
  99840    1680   19616  121136   1d930 ./nsecs.exe
 185936    1968   20240  208144   32d10 ./paranoia.exe
 414992   12096   49072  476160   74400 ./pppd.exe
  79472    1232   19536  100240   18790 ./ticker.exe
  66368    1088   23120   90576   161d0 ./unlimited.exe

The size of the sample executables with this option were:

   text    data     bss     dec     hex filename
  59200    1120   19136   79456   13660 ./base_sp.exe
 178912    2160   22400  203472   31ad0 ./capture.exe
 163712    2112   20160  185984   2d680 ./cdtest.exe
 163696    2192   20352  186240   2d780 ./cxx_iostream.exe
 521344    4672   31584  557600   88220 ./fileio.exe
  89600    1472   19328  110400   1af40 ./hello.exe
 222384    5984   25920  254288   3e150 ./loopback.exe
  33728     304   15024   49056    bfa0 ./minimum.exe
  81280    1584   19248  102112   18ee0 ./nsecs.exe
 164960    1872   19904  186736   2d970 ./paranoia.exe
 402928   12096   48992  464016   71490 ./pppd.exe
  62112    1136   19168   82416   141f0 ./ticker.exe
  64864    1072   23088   89024   15bc0 ./unlimited.exe

Closes #2566.

---

 bsps/m68k/gen68360/config/gen68360.cfg     | 6 +++---
 bsps/m68k/gen68360/config/gen68360_040.cfg | 4 ++--
 bsps/m68k/gen68360/config/pgh360.cfg       | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bsps/m68k/gen68360/config/gen68360.cfg b/bsps/m68k/gen68360/config/gen68360.cfg
index d8e3d2c..4cfcdcf 100644
--- a/bsps/m68k/gen68360/config/gen68360.cfg
+++ b/bsps/m68k/gen68360/config/gen68360.cfg
@@ -1,4 +1,4 @@
-# 
+#
 #  Config file for a "generic 68360" BSP
 
 RTEMS_CPU=m68k
@@ -11,5 +11,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2566.
 # 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
diff --git a/bsps/m68k/gen68360/config/gen68360_040.cfg b/bsps/m68k/gen68360/config/gen68360_040.cfg
index 142f3c7..bec9e24 100644
--- a/bsps/m68k/gen68360/config/gen68360_040.cfg
+++ b/bsps/m68k/gen68360/config/gen68360_040.cfg
@@ -12,5 +12,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2566.
 # 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
diff --git a/bsps/m68k/gen68360/config/pgh360.cfg b/bsps/m68k/gen68360/config/pgh360.cfg
index 2303a62..a4de392 100644
--- a/bsps/m68k/gen68360/config/pgh360.cfg
+++ b/bsps/m68k/gen68360/config/pgh360.cfg
@@ -1,4 +1,4 @@
-# 
+#
 #  Config file for a "generic 68360" BSP
 
 RTEMS_CPU=m68k
@@ -11,5 +11,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2566.
 # 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



More information about the vc mailing list