[oe-commits] [meta-openembedded] 11/36: luajit: fix build II

git at git.openembedded.org git at git.openembedded.org
Tue Mar 22 15:47:53 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 311d2c0bfdb4180f69efcbac395f3339540d8a08
Author: Martin Jansa <Martin.Jansa at gmail.com>
AuthorDate: Thu Mar 17 15:11:23 2016 +0100

    luajit: fix build II
    
    * previous fix didn't work very well, because host version really needs
      to use the same pointer size, so it's better to disable native builds
      completely and let HOST_LUA to be compiled in target build with
      correct params
    * EXTRA_OEMAKE_append_mips64 = ' HOST_CC="${BUILD_CC} -m32"'
      looks like mistake, is mips64 using 32bit pointers?
    
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb | 30 ++++++++++++++-----------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
index 9609469..a0252aa 100644
--- a/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
+++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
@@ -20,19 +20,23 @@ do_configure_prepend() {
     sed -i 's:MULTILIB= lib:MULTILIB= ${baselib}:g' ${S}/Makefile
 }
 
-EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX} \
-                TARGET_CFLAGS="${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" \
-                TARGET_LDFLAGS="${TOOLCHAIN_OPTIONS}" \
-                TARGET_SHLDFLAGS="${TOOLCHAIN_OPTIONS}"'
-EXTRA_OEMAKE_append_powerpc = ' HOST_CC="${BUILD_CC} -m32"'
-EXTRA_OEMAKE_append_x86 = ' HOST_CC="${BUILD_CC} -m32"'
-EXTRA_OEMAKE_append_x86-64 = ' HOST_CC="${BUILD_CC}"'
-EXTRA_OEMAKE_append_powerpc64 = ' HOST_CC="${BUILD_CC}"'
-EXTRA_OEMAKE_append_arm = ' HOST_CC="${BUILD_CC} -m32"'
-EXTRA_OEMAKE_append_mips64 = ' HOST_CC="${BUILD_CC} -m32"'
-
-DEPENDS_append_class_target = " luajit-native"
-EXTRA_OEMAKE_append_class_target = " HOST_LUA=luajit"
+# http://luajit.org/install.html#cross
+# Host luajit needs to be compiled with the same pointer size
+# If you want to cross-compile to any 32 bit target on an x64 OS,
+# you need to install the multilib development package (e.g.
+# libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part
+# (HOST_CC="gcc -m32").
+BUILD_CC_ARCH_append_powerpc = ' -m32'
+BUILD_CC_ARCH_append_x86 = ' -m32'
+BUILD_CC_ARCH_append_arm = ' -m32'
+
+EXTRA_OEMAKE_append_class-target = '\
+    CROSS=${HOST_PREFIX} \
+    HOST_CC="${BUILD_CC} ${BUILD_CC_ARCH}" \
+    TARGET_CFLAGS="${TOOLCHAIN_OPTIONS} ${TARGET_CC_ARCH}" \
+    TARGET_LDFLAGS="${TOOLCHAIN_OPTIONS}" \
+    TARGET_SHLDFLAGS="${TOOLCHAIN_OPTIONS}" \
+'
 
 do_compile () {
     oe_runmake

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list