diff options
Diffstat (limited to 'classes/scons.bbclass')
-rw-r--r-- | classes/scons.bbclass | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/classes/scons.bbclass b/classes/scons.bbclass index b139411c19..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() { @@ -11,10 +21,4 @@ scons_do_install() { oefatal "scons install execution failed." } -scons_do_stage() { - install -d ${D}${prefix} - ${STAGING_BINDIR_NATIVE}/scons PREFIX=${STAGING_DIR_HOST}/${prefix} prefix=${STAGING_DIR_HOST}/${prefix} install || \ - oefatal "scons stage execution failed." -} - -EXPORT_FUNCTIONS do_compile do_install do_stage +EXPORT_FUNCTIONS do_compile do_install |