summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2021-10-05 15:51:16 -0500
committerJoel Sherrill <joel@rtems.org>2021-10-06 08:36:08 -0500
commit17685d0e50651fd95bd221a8660f1ff9a7492d1e (patch)
tree54d6cebdfabb324dbeecd8b956db31bea8186496
parentimx: Remove ccm functions alredy defined in RTEMS (diff)
downloadrtems-libbsd-17685d0e50651fd95bd221a8660f1ff9a7492d1e.tar.bz2
waf_libbsd: Account for library check results
Conditionally compiled tests (consisting only of debugger01) were not compiling as expected when libdebugger was present. This appears to have occurred during the transition from header detection or due to an intervening change in the waf internal libraries. The result of check_cc() is the only location this information is reported, so library checks now set HAVE_<LIBRARY> as appropriate when the library is found so existing code for header configuration correctly recognize that a library is present.
-rw-r--r--waf_libbsd.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/waf_libbsd.py b/waf_libbsd.py
index 0bd4fd3d..ee0a3878 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -180,10 +180,11 @@ class Builder(builder.ModuleManager):
mandatory=False)
elif configTest == 'library':
for l in self.data['configure'][configTest][cfg]:
- conf.check_cc(lib=l,
- fragment=rtems.test_application(),
- execute=False,
- mandatory=False)
+ if conf.check_cc(lib=l,
+ fragment=rtems.test_application(),
+ execute=False,
+ mandatory=False)
+ conf.env['HAVE_%s' % l.upper()] = True
else:
bld.fatal('invalid config test: %s' % (configTest))
section_flags = ["-fdata-sections", "-ffunction-sections"]