From: Caiwen Zhang Date: Mon, 23 Mar 2015 09:32:52 +0000 (+0800) Subject: fix boost library cross-compiling error X-Git-Tag: 1.2.0+RC1~1885 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d62f032a35b05c36f9b29e3b5676e94495ba6c53;p=platform%2Fupstream%2Fiotivity.git fix boost library cross-compiling error Make sure the cross compile toolchain path is added into the 'PATH' key of the environment. Change-Id: Iebe881052d5f9c351a86311d86536e5038b1e53d Signed-off-by: Caiwen Zhang Reviewed-on: https://gerrit.iotivity.org/gerrit/533 Tested-by: jenkins-iotivity Reviewed-by: Yuliya Kamatkova Reviewed-by: Sashi Penta --- diff --git a/build_common/SConscript b/build_common/SConscript index 46cf809..56a872b 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -87,12 +87,11 @@ if target_os in targets_support_cc: prefix = env.get('TC_PREFIX') tc_path = env.get('TC_PATH') if prefix: - env.Replace(CC = prefix + 'gcc') - env.Replace(CXX = prefix + 'g++') - env.Replace(AR = prefix + 'ar') - env.Replace(AS = prefix + 'as') - env.Replace(LINK = prefix + 'ld') - env.Replace(RANLIB = prefix + 'ranlib') + env.Replace(CC = prefix + env.get('CC', 'gcc')) + env.Replace(CXX = prefix + env.get('CXX', 'g++')) + env.Replace(AR = prefix + env.get('AR', 'ar')) + env.Replace(AS = prefix + env.get('AS', 'as')) + env.Replace(RANLIB = prefix + env.get('RANLIB', 'ranlib')) if tc_path: env.PrependENVPath('PATH', tc_path) diff --git a/extlibs/boost/SConscript b/extlibs/boost/SConscript index 751cbb6..f4c0858 100644 --- a/extlibs/boost/SConscript +++ b/extlibs/boost/SConscript @@ -99,7 +99,7 @@ user_config_file.close(); # Ensure that the toolchain is in the PATH penv = os.environ.copy() -penv["PATH"] = tool_path + ":" + penv["PATH"] +penv["PATH"] = tool_path + ":" + env['ENV'].get('PATH', '') + ':' + penv["PATH"] build_path = os.path.join('build', target_os, target_arch)