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:53:18 +1100 |
commit | 3cc039cdac77272a8e16b33ae5a53ccd89edf989 (patch) | |
tree | 9fb7215d101ffa1c351e8cc1523612c558d44342 /waf_libbsd.py | |
parent | rtems_waf: Update to master (096372fc4504) (diff) | |
download | rtems-libbsd-3cc039cdac77272a8e16b33ae5a53ccd89edf989.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 46237c21..3a14541a 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): # |