oe.external: use EXTERNAL_CC for gcc

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2020-06-20 02:38:25 +05:00
parent e74531c5ec
commit 2a3cffd458

View File

@@ -10,7 +10,10 @@ def run(d, cmd, *args):
topdir = d.getVar('TOPDIR')
toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN')
if toolchain_path:
target_cmd = d.getVar('EXTERNAL_TARGET_SYS') + '-' + cmd
if cmd == 'gcc':
target_cmd = d.getVar('EXTERNAL_CC') or d.getVar('EXTERNAL_TARGET_SYS') + '-gcc'
else:
target_cmd = d.getVar('EXTERNAL_TARGET_SYS') + '-' + cmd
toolchain_bin = d.getVar('EXTERNAL_TOOLCHAIN_BIN')
path = os.path.join(toolchain_bin, target_cmd)
args = shlex.split(path) + list(args)