summaryrefslogtreecommitdiffstats
path: root/rtems_waf
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2013-11-25 16:50:48 -0500
committerGedare Bloom <gedare@rtems.org>2013-12-12 14:55:54 -0500
commitacbe98fd00f64274cc9f1ae324338dfd2ccefa80 (patch)
tree880378abc43c0d2365bf803e73b65d117255fc85 /rtems_waf
parentFix rtems.py's filtering of BSPs. (diff)
downloadrtems-examples-acbe98fd00f64274cc9f1ae324338dfd2ccefa80.tar.bz2
rtems.py: add tweak for gc-sections link flag
Diffstat (limited to 'rtems_waf')
-rw-r--r--rtems_waf/rtems.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/rtems_waf/rtems.py b/rtems_waf/rtems.py
index d09da45..a3a386f 100644
--- a/rtems_waf/rtems.py
+++ b/rtems_waf/rtems.py
@@ -216,6 +216,9 @@ def tweaks(conf, arch_bsp):
if re.match('i386-.*-pc[3456]86', arch_bsp) is not None:
conf.env.LINKFLAGS += ['-Wl,-Ttext,0x00100000']
+ if '-ffunction-sections' in conf.env.CFLAGS:
+ conf.env.LINKFLAGS += ['-Wl,--gc-sections']
+
def check_options(ctx, rtems_tools, rtems_path, rtems_version, rtems_archs, rtems_bsps):
#
# Check the paths are valid.