| Submitter | Otavio Salvador |
|---|---|
| Date | June 11, 2012, 3:34 p.m. |
| Message ID | <35554bb06b4c779574cdb162c1701b0791afd459.1339428767.git.otavio@ossystems.com.br> |
| Download | mbox | patch |
| Permalink | /patch/29657/ |
| State | New, archived |
| Headers | show |
Comments
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Op 11-06-12 10:34, Otavio Salvador schreef: > 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. That's not true, you are probably getting a wrong -mfpu setting. This patch changes the ABI, which is the wrong thing to do, NAK. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJP1iCEAAoJEHZqAkdh1vT60rUP/RscVAFvhgbYe5fbkvSM+MI6 M+lWqbjSfMwrk+R4RlNQkJVWIiiWiCnsL3d5DhVa6gonvKpFVkPs73w4qZKfWV6E fawSkXiOMJIYnnxJ45Gcx9RwRu71lRAM+F/22OZIBdEKWreYJ7NB/ZYM/9Rglvgs xwaaDix0fGa5OJsgLyRXXiwQGAR8ii+nAnJ6VyvuKXevU5cVmZ42N/NpnhajtB6q zx1O7hleUeY96AUY09xInXi3x4XY/LxTg361dND7TZN772xHtZh1ovM3RPSaMo8Z enQqLfc1tOmkTva4Bs1MXVkAPPeKzGEGdeW4f+tjvQmhXOnWez6U3JoKok94mw8G V6rU1QH57/2hrfl9EEzXbvIBkWm9YIzjEW1EpFF3piqlEMrm1Tbmp831NDKVqfnh gYRP0l6fMb62GaxXqY2vyvpuYxV/qhJe739FAjmYi9NFFuaShnrDC0EyBHb32luL cNDHynug716QDVrv3+zsgp/5GgmpDgNfJBjnyxvnBfVrkxn223sadsi83ZWE2vOA 4pjE11IaK3RGer9dsAzxYegZiavad8HU9DZLJR1mlzNmHoYJc/EC3euos9l/tlAE EJ814hogHhvSfzjgLfI6+Nom9s9I2shl1p+Osy6av3sf25v1fJPBJmd+HdrIovx5 jR8BLzOaWBpNzVFxZgAN =9VGf -----END PGP SIGNATURE-----
On Mon, Jun 11, 2012 at 1:44 PM, Koen Kooi <koen@dominion.thruhere.net>wrote: > Op 11-06-12 10:34, Otavio Salvador schreef: > > 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. > > That's not true, you are probably getting a wrong -mfpu setting. This patch > changes the ABI, which is the wrong thing to do, NAK. > This is indeed the problem but this caused by the build system and the only way I found to change it was this way. Can you propose another way to fix it?
Patch
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 }
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 <otavio@ossystems.com.br> --- meta-oe/recipes-devtools/nodejs/nodejs_0.6.18.bb | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)