diff options
author | Chris Johns <chrisj@rtems.org> | 2020-03-05 21:18:05 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-03-05 21:18:05 +1100 |
commit | cbdeec00de5c40b168adf5395a9e2e7c55ceee7c (patch) | |
tree | c5b7008adb0985281f37bd4aeccff53597590e23 /waf_libbsd.py | |
parent | rtems_waf: Update to master (096372fc4504) (diff) | |
download | rtems-libbsd-cbdeec00de5c40b168adf5395a9e2e7c55ceee7c.tar.bz2 |
waf: Change the test configure check for libdebugger to it's lib
- Add support for a 'test-if-library'
- Use rtems_waf's 'test_application()' fragment in the check_cc
call
Closes #3948
Diffstat (limited to 'waf_libbsd.py')
-rw-r--r-- | waf_libbsd.py | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/waf_libbsd.py b/waf_libbsd.py index 84f22b76..e6f3c21c 100644 --- a/waf_libbsd.py +++ b/waf_libbsd.py @@ -109,7 +109,10 @@ class Builder(builder.ModuleManager): if config != 'default': if 'configure' not in data: data['configure'] = { } - data['configure'][config] = frag[0][2][1] + configTest = frag[1]['configTest'] + if configTest not in data['configure']: + data['configure'][configTest] = { } + data['configure'][configTest][config] = frag[0][2][1] if type(frag[1]) is list: if config not in d[cpu]: d[cpu][config] = [] @@ -149,12 +152,23 @@ class Builder(builder.ModuleManager): def bsp_configure(self, conf, arch_bsp): if 'configure' in self.data: - for cfg in self.data['configure']: - for h in self.data['configure'][cfg]: - conf.check(header_name = h, - features = "c", - includes = conf.env.IFLAGS, - mandatory = False) + for configTest in self.data['configure']: + for cfg in self.data['configure'][configTest]: + if configTest == 'header': + for h in self.data['configure'][configTest][cfg]: + conf.check(header_name = h, + features = "c", + includes = conf.env.IFLAGS, + 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) + else: + bld.fatal('invalid config test: %s' % (configTest)) + def build(self, bld): # |