[rtems-libbsd commit] waf_libbsd: Account for library check results

Joel Sherrill joel at rtems.org
Wed Oct 6 13:32:44 UTC 2021


Module:    rtems-libbsd
Branch:    6-freebsd-12
Commit:    e6bd18c10bae97ca2110025c9316e591d0cb96f9
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=e6bd18c10bae97ca2110025c9316e591d0cb96f9

Author:    Kinsey Moore <kinsey.moore at oarcorp.com>
Date:      Tue Oct  5 15:51:16 2021 -0500

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.

---

 waf_libbsd.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/waf_libbsd.py b/waf_libbsd.py
index 97e6d6e..613797a 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"]



More information about the vc mailing list