From patchwork Mon Jun 11 15:34:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [meta-oe,2/3] nodejs: force use of -mfpu-abi=soft for ARMv5 Date: Mon, 11 Jun 2012 15:34:57 -0000 From: Otavio Salvador X-Patchwork-Id: 29657 Message-Id: <35554bb06b4c779574cdb162c1701b0791afd459.1339428767.git.otavio@ossystems.com.br> To: openembedded-devel@lists.openembedded.org The build system defaults to 'softfp' but this use hardware instructions that are not available making node to fail to run on ARMv5 based CPUs. Now we check if TARGET_FPU is 'soft' and change the default of the build system so it works. Tested on i.MX233 (ARM926EJ-S) Signed-off-by: Otavio Salvador --- meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb b/meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb index 7136ffc..972d02a 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=914812f2875eef849b5c509cc25dcb4f" DEPENDS = "openssl" +PR = "r1" + SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz \ file://fix-hardfloat-detection.patch" @@ -16,6 +18,9 @@ S = "${WORKDIR}/node-v${PV}" # v8 errors out if you have set CCACHE CCACHE = "" +# Workaround a build to proper use soft FPU for armv5 +FORCE_SOFT_FPU = "${@bb.utils.contains("TUNE_FEATURES", "soft", "yes", "no", d)}" + do_configure_virtclass-native () { sed -i -e s:\'/usr/lib:\'${STAGING_LIBDIR}:g wscript sed -i -e s:\'/usr/local/lib:\'${STAGING_LIBDIR}:g wscript @@ -40,6 +45,10 @@ do_configure () { export CC=gcc export CXX=g++ + if [ "${FORCE_SOFT_FPU}" = "yes" ]; then + sed -i "s,'default': 'softfp','default': 'soft',g" ${S}/deps/v8/SConstruct + fi + ./configure --prefix=${prefix} --without-snapshot }