From: Caiwen Zhang Date: Fri, 12 Jun 2015 01:10:45 +0000 (+0800) Subject: Fix cross compile link error X-Git-Tag: 1.2.0+RC1~1609 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d3b10e0964de6f2ecf3706e6875592948baa155;p=platform%2Fupstream%2Fiotivity.git Fix cross compile link error If call ld directly some flags (e.g. -m32) can't be recoglized. Change-Id: I7f0c62c9f9e7530baf61ed9c658aa1cb15008009 Signed-off-by: Caiwen Zhang Reviewed-on: https://gerrit.iotivity.org/gerrit/1248 Reviewed-by: Nirav Shah Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- diff --git a/build_common/SConscript b/build_common/SConscript old mode 100755 new mode 100644 index a433095..c3f43ce --- a/build_common/SConscript +++ b/build_common/SConscript @@ -132,12 +132,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)