From 8d3b10e0964de6f2ecf3706e6875592948baa155 Mon Sep 17 00:00:00 2001 From: Caiwen Zhang Date: Fri, 12 Jun 2015 09:10:45 +0800 Subject: [PATCH] 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 --- build_common/SConscript | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) mode change 100755 => 100644 build_common/SConscript 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) -- 2.7.4