tcmode: add unset or nonexistant EXTERNAL_TOOLCHAIN check

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2012-08-15 17:12:40 -07:00
parent db995d3bf1
commit 20c8a729e3

View File

@@ -85,6 +85,10 @@ python toolchain_metadata_setup () {
l.finalize()
oe_import(l)
external_toolchain = l.getVar('EXTERNAL_TOOLCHAIN', True)
if not external_toolchain or not os.path.exists(external_toolchain):
bb.fatal("Error: EXTERNAL_TOOLCHAIN must be set to the path to your sourcery toolchain")
if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
d.setVar('TOOLCHAIN_PATH_ADD', '')
populate_toolchain_links(l)