[rtems commit] arm/altera-cyclone-v: Add per-section compilation and linking support
Joel Sherrill
joel at rtems.org
Fri Jan 8 00:45:51 UTC 2016
Module: rtems
Branch: master
Commit: 1a244d14103c10262ace5f072748c5dc13153996
Changeset: http://git.rtems.org/rtems/commit/?id=1a244d14103c10262ace5f072748c5dc13153996
Author: Aun-Ali Zaidi <admin at kodeit.net>
Date: Wed Jan 6 21:41:21 2016 -0600
arm/altera-cyclone-v: Add per-section compilation and linking support
The size of the sample executables without this option were:
text data bss dec hex filename
102224 1896 1071540512 1071644632 3fdfffd8 minimum.exe
114052 2012 1071528560 1071644624 3fdfffd0 base_sp.exe
124228 2100 1071518284 1071644612 3fdfffc4 nsecs.exe
156660 2488 1071485472 1071644620 3fdfffcc capture.exe
171712 2032 1071470888 1071644632 3fdfffd8 cdtest.exe
152916 2388 1071489312 1071644616 3fdfffc8 paranoia.exe
107132 1980 1071535512 1071644624 3fdfffd0 hello.exe
421588 5924 1071217120 1071644632 3fdfffd8 fileio.exe
116652 2012 1071525960 1071644624 3fdfffd0 ticker.exe
205796 6784 1071432044 1071644624 3fdfffd0 loopback.exe
442992 2240 1071199404 1071644636 3fdfffdc cxx_iostream.exe
332816 12900 1071298908 1071644624 3fdfffd0 pppd.exe
116180 2036 1071526400 1071644616 3fdfffc8 unlimited.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
24988 1280 1071618360 1071644628 3fdfffd4 minimum.exe
67872 1940 1071574804 1071644616 3fdfffc8 base_sp.exe
81480 2028 1071561132 1071644640 3fdfffe0 nsecs.exe
133340 2408 1071508888 1071644636 3fdfffdc capture.exe
140428 1960 1071502236 1071644624 3fdfffd0 cdtest.exe
120388 2316 1071521936 1071644640 3fdfffe0 paranoia.exe
73212 1900 1071569528 1071644640 3fdfffe0 hello.exe
392652 5852 1071246120 1071644624 3fdfffd0 fileio.exe
70472 1940 1071572204 1071644616 3fdfffc8 ticker.exe
175352 6624 1071462652 1071644628 3fdfffd4 loopback.exe
290832 2160 1071351628 1071644620 3fdfffcc cxx_iostream.exe
294284 12696 1071337640 1071644620 3fdfffcc pppd.exe
69124 1956 1071573552 1071644632 3fdfffd8 unlimited.exe
---
c/src/lib/libbsp/arm/altera-cyclone-v/make/custom/altcycv.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/make/custom/altcycv.inc b/c/src/lib/libbsp/arm/altera-cyclone-v/make/custom/altcycv.inc
index bbe3f54..f3e7f1a 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/make/custom/altcycv.inc
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/make/custom/altcycv.inc
@@ -6,3 +6,7 @@ CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9
#CFLAGS_OPTIMIZE_V ?= -O0 -g
CFLAGS_OPTIMIZE_V ?= -O2 -g
+
+# Add CFLAGS and LDFLAGS for compiling and linking with per item sections
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list