summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-21 19:25:55 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-21 15:48:19 -0600
commitb963c8dd0c73b9d02b9011d4472683bafaf71689 (patch)
tree5ee666e4882db6475525ee1542aa6740b0a23ccd
parentmips/rbtx4925: Add per-section compilation and linking support. (diff)
downloadrtems-b963c8dd0c73b9d02b9011d4472683bafaf71689.tar.bz2
mips/rbtx4938: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 105928 7448 12304 125680 1eaf0 base_sp.exe 114276 6464 11904 132644 20624 hello.exe 64908 4248 8592 77748 12fb4 minimum.exe 568808 80292 24680 673780 a47f4 fileio.exe 128232 9936 12472 150640 24c70 nsecs.exe 162840 20132 12976 195948 2fd6c paranoia.exe 109944 8300 12352 130596 1fe24 ticker.exe 109880 7676 15728 133284 208a4 unlimited.exe 1035584 48120 19681 1103385 10d619 cxx_iostream.exe 216136 18520 12609 247265 3c5e1 cdtest.exe 205784 22188 14180 242152 3b1e8 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 93464 6776 12188 112428 1b72c base_sp.exe 99480 5780 11788 117048 1c938 hello.exe 40616 3208 8512 52336 cc70 minimum.exe 545448 77224 24130 646802 9de92 fileio.exe 117528 9224 12340 139092 21f54 nsecs.exe 149784 19428 12804 182016 2c700 paranoia.exe 98760 7616 12204 118580 1cf34 ticker.exe 95672 6976 15620 118268 1cdfc unlimited.exe 530280 38896 18753 587929 8f899 cxx_iostream.exe 198832 16492 12473 227797 379d5 cdtest.exe 190632 21160 14036 225828 37224 capture.exe
-rw-r--r--c/src/lib/libbsp/mips/rbtx4938/make/custom/rbtx4938.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/mips/rbtx4938/make/custom/rbtx4938.cfg b/c/src/lib/libbsp/mips/rbtx4938/make/custom/rbtx4938.cfg
index aa4b542cae..a60a8c6307 100644
--- a/c/src/lib/libbsp/mips/rbtx4938/make/custom/rbtx4938.cfg
+++ b/c/src/lib/libbsp/mips/rbtx4938/make/custom/rbtx4938.cfg
@@ -12,6 +12,9 @@ CPU_CFLAGS = -mips3 -G0 -EL
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
$(OBJCOPY) --srec-len=30 -O srec $@ $(basename $@)$(DOWNEXT)