summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-03-10 12:31:37 -0600
committerJoel Sherrill <joel@rtems.org>2016-03-10 18:08:06 -0600
commitfa9c057f0fd058de8a4feb76095b952c0615b7ed (patch)
tree3b1916de001ec6dd96767af017ce3649e2ebe8e3
parentarm/lpc32xx: Add per-section compilation and linking suppo (diff)
downloadrtems-fa9c057f0fd058de8a4feb76095b952c0615b7ed.tar.bz2
arm/raspberrypi: Add per-section compilation and linking suppo
updates #2577. For the raspberrypi BSP variant without this option, sample executable sizes were as follows: text data bss dec hex filename 91516 1724 134080496 134173736 7ff5428 ticker.exe 57809 1480 134114460 134173749 7ff5435 minimum.exe 816524 2004 133355216 134173744 7ff5430 cxx_iostream.exe 561132 5808 133606812 134173752 7ff5438 fileio.exe 444724 12624 133716388 134173736 7ff5428 pppd.exe 193344 2360 133978052 134173756 7ff543c capture.exe 109682 1812 134062236 134173730 7ff5422 nsecs.exe 175408 2100 133996244 134173752 7ff5438 paranoia.exe 187108 1756 133984880 134173744 7ff5430 cdtest.exe 88548 1724 134083488 134173760 7ff5440 base_sp.exe 91432 1748 134080552 134173732 7ff5424 unlimited.exe 103652 1700 134068384 134173736 7ff5428 hello.exe 271116 6508 133896112 134173736 7ff5428 loopback.exe For the raspberrypi BSP variant with this option, sample executable sizes were as follows: text data bss dec hex filename 85796 1700 134086236 134173732 7ff5424 ticker.exe 34428 1408 134137896 134173732 7ff5424 minimum.exe 508720 1972 133663044 134173736 7ff5428 cxx_iostream.exe 544516 5776 133623452 134173744 7ff5430 fileio.exe 409916 12452 133751380 134173748 7ff5434 pppd.exe 184020 2320 133987416 134173756 7ff543c capture.exe 104486 1788 134067476 134173750 7ff5436 nsecs.exe 168504 2068 134003164 134173736 7ff5428 paranoia.exe 178740 1732 133993272 134173744 7ff5430 cdtest.exe 81988 1692 134090068 134173748 7ff5434 base_sp.exe 82460 1716 134089568 134173744 7ff5430 unlimited.exe 94316 1636 134077800 134173752 7ff5438 hello.exe 249228 6388 133918144 134173760 7ff5440 loopback.exe
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.inc b/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.inc
index 3b4fb50e58..a8b6f264c3 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.inc
+++ b/c/src/lib/libbsp/arm/raspberrypi/make/custom/raspberrypi.inc
@@ -7,6 +7,9 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
CFLAGS_OPTIMIZE_V ?= -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
# This defines the operations performed on the linked executable.
# is currently required.