[examples-v2 commit] rtems.py: add tweak for gc-sections link flag

Gedare Bloom gedare at rtems.org
Thu Dec 12 19:49:53 UTC 2013


Module:    examples-v2
Branch:    master
Commit:    acbe98fd00f64274cc9f1ae324338dfd2ccefa80
Changeset: http://git.rtems.org/examples-v2/commit/?id=acbe98fd00f64274cc9f1ae324338dfd2ccefa80

Author:    Gedare Bloom <gedare at rtems.org>
Date:      Mon Nov 25 16:50:48 2013 -0500

rtems.py: add tweak for gc-sections link flag

---

 rtems_waf/rtems.py |    3 +++
 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.




More information about the vc mailing list