aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2016-03-17 15:11:23 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-03-25 11:26:57 +0100
commiteb7aa7a3841a2762964d6f743a57bf31463c8554 (patch)
treeb969e712e6c3877c3f60c269a83cc66446b519f3 /meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
parentd82b0d8f638d1e1c7d9175605eadabfb99a6d345 (diff)
downloadmeta-openembedded-eb7aa7a3841a2762964d6f743a57bf31463c8554.tar.gz
meta-openembedded-eb7aa7a3841a2762964d6f743a57bf31463c8554.tar.bz2
meta-openembedded-eb7aa7a3841a2762964d6f743a57bf31463c8554.zip
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@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb')
-rw-r--r--meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb30
1 files 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 960946992..a0252aa94 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