summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-05-31 10:38:58 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2016-06-08 14:55:24 +0200
commit852cd67b916cdbe9f91d5323fe2a6cc790a7a0eb (patch)
treea4c99978992051c8f2fa8c742b6475a3c46d8d8e
parent0cce9fee049c3186cd07d791f602ada52e5afbc9 (diff)
downloadmeta-openembedded-852cd67b916cdbe9f91d5323fe2a6cc790a7a0eb.tar.gz
luajit: fix build issues, obey more vars
Rework how variables are passed in to ensure that more of our flag vars are obeyed, make it obey more of our target path vars, and use fewer of its hardcoded flags. Also add verbosity to the compile output for debugging. Without this, errors were seen for us: | In file included from .../lib/gcc/i686-pc-linux-gnu/5.2.0/include-fixed/64/sgxx-glibc/syslimits.h:7:0, | from .../lib/gcc/i686-pc-linux-gnu/5.2.0/include-fixed/64/sgxx-glibc/limits.h:34, | from luaconf.h:12, | from lua.h:16, | from lj_arch.h:9: | .../lib/gcc/i686-pc-linux-gnu/5.2.0/include-fixed/64/sgxx-glibc/limits.h:168:61: fatal error: limits.h: No such file or directory | compilation terminated. | Makefile:233: *** Unsupported target architecture. Stop. | make[1]: Leaving directory '.../luajit/2.0.4-r0/LuaJIT-2.0.4/src' Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb56
1 files changed, 43 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 a0252aa94..964dc1d59 100644
--- a/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
+++ b/meta-oe/recipes-devtools/luajit/luajit_2.0.4.bb
@@ -15,11 +15,6 @@ inherit pkgconfig binconfig
15 15
16BBCLASSEXTEND = "native" 16BBCLASSEXTEND = "native"
17 17
18do_configure_prepend() {
19 sed -i 's:PREFIX= /usr/local:PREFIX= ${prefix}:g' ${S}/Makefile
20 sed -i 's:MULTILIB= lib:MULTILIB= ${baselib}:g' ${S}/Makefile
21}
22
23# http://luajit.org/install.html#cross 18# http://luajit.org/install.html#cross
24# Host luajit needs to be compiled with the same pointer size 19# Host luajit needs to be compiled with the same pointer size
25# If you want to cross-compile to any 32 bit target on an x64 OS, 20# If you want to cross-compile to any 32 bit target on an x64 OS,
@@ -30,20 +25,52 @@ BUILD_CC_ARCH_append_powerpc = ' -m32'
30BUILD_CC_ARCH_append_x86 = ' -m32' 25BUILD_CC_ARCH_append_x86 = ' -m32'
31BUILD_CC_ARCH_append_arm = ' -m32' 26BUILD_CC_ARCH_append_arm = ' -m32'
32 27
33EXTRA_OEMAKE_append_class-target = '\ 28# The lua makefiles expect the TARGET_SYS to be from uname -s
34 CROSS=${HOST_PREFIX} \ 29# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
35 HOST_CC="${BUILD_CC} ${BUILD_CC_ARCH}" \ 30LUA_TARGET_OS = "Unknown"
36 TARGET_CFLAGS="${TOOLCHAIN_OPTIONS} ${TARGET_CC_ARCH}" \ 31LUA_TARGET_OS_darwin = "Darwin"
37 TARGET_LDFLAGS="${TOOLCHAIN_OPTIONS}" \ 32LUA_TARGET_OS_linux = "Linux"
38 TARGET_SHLDFLAGS="${TOOLCHAIN_OPTIONS}" \ 33LUA_TARGET_OS_linux-gnueabi = "Linux"
39' 34LUA_TARGET_OS_mingw32 = "Windows"
35
36# We don't want the lua buildsystem's compiler optimizations, or its
37# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply
38# to both host and target compiles
39EXTRA_OEMAKE = "\
40 Q= E='@:' \
41 \
42 CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \
43 \
44 'TARGET_SYS=${LUA_TARGET_OS}' \
45 \
46 'CC=${CC}' \
47 'TARGET_AR=${AR} rcus' \
48 'TARGET_CFLAGS=${CFLAGS}' \
49 'TARGET_LDFLAGS=${LDFLAGS}' \
50 'TARGET_SHLDFLAGS=${LDFLAGS}' \
51 'HOST_CC=${BUILD_CC}' \
52 'HOST_CFLAGS=${BUILD_CFLAGS}' \
53 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \
54 \
55 'PREFIX=${prefix}' \
56 'MULTILIB=${baselib}' \
57"
40 58
41do_compile () { 59do_compile () {
42 oe_runmake 60 oe_runmake
43} 61}
44 62
63# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the
64# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those
65# expectations.
66EXTRA_OEMAKEINST = "\
67 'DESTDIR=${D}' \
68 'INSTALL_BIN=${D}${bindir}' \
69 'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \
70 'INSTALL_MAN=${D}${mandir}/man1' \
71"
45do_install () { 72do_install () {
46 oe_runmake 'DESTDIR=${D}' install 73 oe_runmake ${EXTRA_OEMAKEINST} install
47 rmdir ${D}${datadir}/lua/5.* \ 74 rmdir ${D}${datadir}/lua/5.* \
48 ${D}${datadir}/lua \ 75 ${D}${datadir}/lua \
49 ${D}${libdir}/lua/5.* \ 76 ${D}${libdir}/lua/5.* \
@@ -52,6 +79,9 @@ do_install () {
52 79
53PACKAGES += 'luajit-common' 80PACKAGES += 'luajit-common'
54 81
82# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded
83# paths are packaged regardless of what the libdir and datadir paths are.
84FILES_${PN} += "${prefix}/${baselib} ${prefix}/share"
55FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ 85FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \
56 ${libdir}/libluajit-5.1.so.${PV} \ 86 ${libdir}/libluajit-5.1.so.${PV} \
57" 87"