summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/luajit
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/luajit')
-rw-r--r--meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch13
-rw-r--r--meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb53
2 files changed, 66 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch b/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch
new file mode 100644
index 000000000..c96fc77c7
--- /dev/null
+++ b/meta-oe/recipes-devtools/luajit/luajit-2.0.0/disable_lj_vm_foldarith_for_spe.patch
@@ -0,0 +1,13 @@
1Index: LuaJIT-2.0.0/src/lj_vmmath.c
2===================================================================
3--- LuaJIT-2.0.0.orig/src/lj_vmmath.c 2012-11-08 02:10:00.000000000 -0800
4+++ LuaJIT-2.0.0/src/lj_vmmath.c 2012-11-19 22:15:28.613527136 -0800
5@@ -22,7 +22,7 @@
6 LJ_FUNCA double lj_vm_tanh(double x) { return tanh(x); }
7 #endif
8
9-#if !LJ_TARGET_X86ORX64
10+#if !(LJ_TARGET_X86ORX64 || LJ_TARGET_PPCSPE)
11 double lj_vm_foldarith(double x, double y, int op)
12 {
13 switch (op) {
diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
new file mode 100644
index 000000000..ac769cf44
--- /dev/null
+++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.0.bb
@@ -0,0 +1,53 @@
1DESCRIPTION = " a Just-In-Time Compiler for Lua"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9511885992e4900014e3b13ca6372b7d"
4HOMEPAGE = "http://luajit.org"
5
6DEPENDS += "lua5.1"
7PR = "r0"
8SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \
9 file://disable_lj_vm_foldarith_for_spe.patch \
10 "
11SRC_URI[md5sum] = "97a2b87cc0490784f54b64cfb3b8f5ad"
12SRC_URI[sha256sum] = "deaed645c4a093c5fb250c30c9933c9131ee05c94b13262d58f6e0b60b338c15"
13
14S = "${WORKDIR}/LuaJIT-${PV}"
15
16inherit pkgconfig binconfig
17
18do_configure_prepend() {
19 sed -i -e s:/usr/local:${prefix}:g ${S}/Makefile
20 sed -i -e s:/lib:${base_libdir}:g ${S}/Makefile
21}
22
23EXTRA_OEMAKE = 'CROSS=${HOST_PREFIX}'
24EXTRA_OEMAKE_append_powerpc = ' HOST_CC="${BUILD_CC} -m32"'
25EXTRA_OEMAKE_append_x86-64 = ' HOST_CC="${BUILD_CC}"'
26EXTRA_OEMAKE_append_i586 = ' HOST_CC="${BUILD_CC} -m32"'
27EXTRA_OEMAKE_append_powerpc64 = ' HOST_CC="${BUILD_CC}"'
28EXTRA_OEMAKE_append_arm = ' HOST_CC="${BUILD_CC} -m32"'
29EXTRA_OEMAKE_append_mips64 = ' HOST_CC="${BUILD_CC} -m32"'
30
31do_compile () {
32 oe_runmake
33}
34
35do_install () {
36 oe_runmake 'DESTDIR=${D}' install
37 rmdir ${D}${datadir}/lua/5.1 \
38 ${D}${datadir}/lua \
39 ${D}${libdir}/lua/5.1 \
40 ${D}${libdir}/lua
41}
42
43PACKAGES += 'luajit-common'
44
45FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \
46 ${libdir}/libluajit-5.1.so.2.0.0 \
47 "
48FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \
49 ${libdir}/libluajit-5.1.so \
50 ${libdir}/pkgconfig/luajit.pc \
51 "
52FILES_luajit-common = "${datadir}/${BPN}-${PV}"
53