mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-04 06:54:36 +02:00
tcmode: filter out default cs intall paths from PATH
The toolchain installer can end up modifying the user's PATH via their dotfiles, but if the ia32 sourcery g++ toolchain is always in the user's path, things can fail to build, as the ia32 toolchain provides non-prefixed binaries (e.g. 'gcc', 'ld'). Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
@@ -99,6 +99,14 @@ python toolchain_metadata_setup () {
|
||||
l.finalize()
|
||||
oe_import(l)
|
||||
|
||||
# Remove already-added toolchain install paths from the PATH, as they can
|
||||
# break the build (in particular, the ia32 toolchain, as it provdes
|
||||
# non-prefixed binaries).
|
||||
install_prefix_default = bb.data.expand('${HOME}/CodeSourcery/', l)
|
||||
path = d.getVar('PATH', True).split(':')
|
||||
path = filter(lambda p: not p.startswith(install_prefix_default), path)
|
||||
d.setVar('PATH', ':'.join(path))
|
||||
|
||||
external_toolchain = l.getVar('EXTERNAL_TOOLCHAIN', True)
|
||||
if not external_toolchain or external_toolchain == 'UNDEFINED':
|
||||
bb.fatal("Error: EXTERNAL_TOOLCHAIN must be set to the path to your sourcery toolchain")
|
||||
|
||||
Reference in New Issue
Block a user