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

Joel Sherrill joel at rtems.org
Fri Jan 22 01:10:24 UTC 2016


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

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Fri Jan 22 00:46:13 2016 +0000

m68k/ods68302: Add per-section compilation and linking support.

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 115696	   1632	  22688	 140016	  222f0	base_sp.exe
 114416	   1600	  22288	 138304	  21c40	hello.exe
  74768	   1360	  19040	  95168	  173c0	minimum.exe
 129744	   1712	  22784	 154240	  25a80	nsecs.exe
 200544	   2000	  23280	 225824	  37220	paranoia.exe
 120000	   1632	  22720	 144352	  233e0	ticker.exe
 118464	   1664	  26128	 146256	  23b50	unlimited.exe
 191904	   2224	  22864	 216992	  34fa0	cdtest.exe
 186416	   2128	  24512	 213056	  34040	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
  75840	   1616	  22368	  99824	  185f0	base_sp.exe
  90128	   1568	  21968	 113664	  1bc00	hello.exe
  31968	   1184	  18720	  51872	   caa0	minimum.exe
  96256	   1696	  22480	 120432	  1d670	nsecs.exe
 176816	   1984	  22960	 201760	  31420	paranoia.exe
  80896	   1616	  22400	 104912	  199d0	ticker.exe
  77856	   1632	  25808	 105296	  19b50	unlimited.exe
 176304	   2096	  22528	 200928	  310e0	cdtest.exe
 176944	   2080	  24192	 203216	  319d0	capture.exe

---

 c/src/lib/libbsp/m68k/ods68302/make/custom/ods68302.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/m68k/ods68302/make/custom/ods68302.cfg b/c/src/lib/libbsp/m68k/ods68302/make/custom/ods68302.cfg
index 9feb5f8..b23ea1c 100644
--- a/c/src/lib/libbsp/m68k/ods68302/make/custom/ods68302.cfg
+++ b/c/src/lib/libbsp/m68k/ods68302/make/custom/ods68302.cfg
@@ -19,6 +19,9 @@ CPU_CFLAGS = -mcpu=68302
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
 
 ifeq ($(RTEMS_DEBUGGER),yes)
 LINKCMDS=$(PROJECT_RELEASE)/lib/debugrom



More information about the vc mailing list