aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-03-30 13:04:33 +0200
committerKoen Kooi <koen@openembedded.org>2010-03-30 13:04:33 +0200
commit01d75b1a857f53f22304266e3d88c11993851563 (patch)
tree7e289dadb258953ff8af8c9278f85445e2e7c887 /classes
parent584b124b6b8672c6cd0de9254269da5f3817df8e (diff)
downloadopenembedded-01d75b1a857f53f22304266e3d88c11993851563.tar.gz
scons bbclass: add SCONS_FIX_ENV option that allows you to fix the toolchain from env
Diffstat (limited to 'classes')
-rw-r--r--classes/scons.bbclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/classes/scons.bbclass b/classes/scons.bbclass
index b7007b03a6..2a935e4685 100644
--- a/classes/scons.bbclass
+++ b/classes/scons.bbclass
@@ -1,8 +1,18 @@
DEPENDS += "python-scons-native"
+export TARGET_LINK_HASH_STYLE
+
scons_do_compile() {
- ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} || \
- oefatal "scons build execution failed."
+ if [ "${SCONS_FIX_ENV}" = "1" ] ; then
+ if grep "toolchain-from-env" ${S}/SConstruct ; then
+ echo "Toolchain overrides already applied"
+ else
+ cat ${STAGING_DATADIR_NATIVE}/scons/toolchain-from-env.SConscript >> ${S}/SConstruct
+ fi
+ fi
+
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} CXX="${CXX}" PREFIX=${prefix} prefix=${prefix} || \
+ oefatal "scons build execution failed."
}
scons_do_install() {