[rtems-libbsd commit] build: Do not convert cflags to defines

Sebastian Huber sebh at rtems.org
Wed Jul 8 08:23:01 UTC 2020


Module:    rtems-libbsd
Branch:    5-freebsd-12
Commit:    36a19bfde48939a3653345ac943b1c8bf23f3c13
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=36a19bfde48939a3653345ac943b1c8bf23f3c13

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Jun 15 07:18:23 2020 +0200

build: Do not convert cflags to defines

This makes it possible to use module-specific C flags, for example to
instrument functions (-finstrument-functions).

---

 waf_libbsd.py | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/waf_libbsd.py b/waf_libbsd.py
index 14f2ae7..310a692 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -452,19 +452,11 @@ class Builder(builder.ModuleManager):
             for arch in archs:
                 if bld.get_env()['RTEMS_ARCH'] == arch:
                     bld_sources += Builder._sourceList(bld, build[arch])
-            if 'cflags' in build:
-                bld_defines = [d[2:] for d in build['cflags']]
-            else:
-                bld_defines = []
-            if 'includes' in build:
-                bld_includes = build['includes']
-            else:
-                bld_includes = []
             bld.objects(target = target,
                         features = 'c',
-                        cflags = cflags,
-                        includes = sorted(bld_includes) + includes,
-                        defines = defines + sorted(bld_defines),
+                        cflags = cflags + sorted(build.get('cflags', [])),
+                        includes = sorted(build.get('includes', [])) + includes,
+                        defines = defines,
                         source = bld_sources)
             libbsd_use += [target]
 



More information about the vc mailing list