waf: fix programs searches
Here we do the following: 1) Move the pkg-config check to boards.py so we only check of it for linux boards 2) Use cfg.find_toolchain_program() if possible, for example, for AR
This commit is contained in:
parent
f430ef3825
commit
e31a06cfdb
@ -218,6 +218,8 @@ class linux(Board):
|
||||
def configure_env(self, cfg, env):
|
||||
super(linux, self).configure_env(cfg, env)
|
||||
|
||||
cfg.find_toolchain_program('pkg-config', var='PKGCONFIG')
|
||||
|
||||
env.DEFINES.update(
|
||||
CONFIG_HAL_BOARD = 'HAL_BOARD_LINUX',
|
||||
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_NONE',
|
||||
|
@ -133,8 +133,8 @@ def configure(cfg):
|
||||
_filter_supported_c_compilers('gcc', 'clang')
|
||||
_filter_supported_cxx_compilers('g++', 'clang++')
|
||||
|
||||
cfg.env.AR = cfg.env.TOOLCHAIN + '-ar'
|
||||
cfg.env.PKGCONFIG = cfg.env.TOOLCHAIN + '-pkg-config'
|
||||
cfg.find_toolchain_program('ar')
|
||||
|
||||
cfg.msg('Using toolchain', cfg.env.TOOLCHAIN)
|
||||
cfg.load('compiler_cxx compiler_c')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user