summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-02-24 14:56:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-06-23 10:46:17 +0200
commit3f0f73956d8de0e87b33afe877b04a0e8371230d (patch)
tree7bf0de1c7de2229aadf98c0efdd9e4064ac42788
parentREADME.rst: Remove RTEMS_POSIX_API from BSP config (diff)
downloadrtems-libbsd-3f0f73956d8de0e87b33afe877b04a0e8371230d.tar.bz2
build: Ensure mandatory compiler/linker flags
Make sure the flags are present in all build configurations.
-rw-r--r--waf_libbsd.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/waf_libbsd.py b/waf_libbsd.py
index dd391191..acf93a2f 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -194,16 +194,16 @@ class Builder(builder.ModuleManager):
conf.env['HAVE_%s' % l.upper()] = True
else:
bld.fatal('invalid config test: %s' % (configTest))
- section_flags = ["-fdata-sections", "-ffunction-sections"]
- _add_flags_if_not_present(conf.env.CFLAGS, section_flags)
- _add_flags_if_not_present(conf.env.CXXFLAGS, section_flags)
- _add_flags_if_not_present(conf.env.LINKFLAGS, ["-Wl,--gc-sections"])
conf.env.CFLAGS = _remove_bsp_include_path(conf.env.IFLAGS,
conf.env.CFLAGS)
conf.env.CXXFLAGS = _remove_bsp_include_path(conf.env.IFLAGS,
conf.env.CXXFLAGS)
conf.env.LINKFLAGS = _remove_bsp_include_path(conf.env.IFLAGS,
conf.env.LINKFLAGS)
+ section_flags = ["-fdata-sections", "-ffunction-sections"]
+ _add_flags_if_not_present(conf.env.CFLAGS, section_flags)
+ _add_flags_if_not_present(conf.env.CXXFLAGS, section_flags)
+ _add_flags_if_not_present(conf.env.LINKFLAGS, ["-Wl,--gc-sections"])
def build(self, bld):
#