From 14eb47687eb9f4bd9847eb9e6527fe75bd8e77a4 Mon Sep 17 00:00:00 2001 From: Leo Yan Date: Wed, 26 Feb 2020 12:26:22 +0000 Subject: luajit: Upgrade to 2.1.0-beta3 Since luajit 2.1.0-beta3 can support architecture aarch64 and the old misses to support aarch64, the patch upgrades to luajit 2.1.0-beta3. Also updated clang.patch to dismiss patch warning: "Hunk #1 succeeded at 436 with fuzz 1 (offset 123 lines)." Signed-off-by: Leo Yan Signed-off-by: Khem Raj --- meta-oe/recipes-devtools/luajit/luajit/clang.patch | 4 +- meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb | 100 --------------------- meta-oe/recipes-devtools/luajit/luajit_git.bb | 99 ++++++++++++++++++++ 3 files changed, 101 insertions(+), 102 deletions(-) delete mode 100644 meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb create mode 100644 meta-oe/recipes-devtools/luajit/luajit_git.bb (limited to 'meta-oe/recipes-devtools') diff --git a/meta-oe/recipes-devtools/luajit/luajit/clang.patch b/meta-oe/recipes-devtools/luajit/luajit/clang.patch index c39ef6fd4a..807cc4417f 100644 --- a/meta-oe/recipes-devtools/luajit/luajit/clang.patch +++ b/meta-oe/recipes-devtools/luajit/luajit/clang.patch @@ -8,8 +8,8 @@ Index: LuaJIT-2.0.5/src/lj_arch.h =================================================================== --- LuaJIT-2.0.5.orig/src/lj_arch.h +++ LuaJIT-2.0.5/src/lj_arch.h -@@ -313,7 +313,7 @@ - #error "Need at least GCC 4.2 or newer" +@@ -436,7 +436,7 @@ + #endif #endif #elif !LJ_TARGET_PS3 -#if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb b/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb deleted file mode 100644 index 93128dda83..0000000000 --- a/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb +++ /dev/null @@ -1,100 +0,0 @@ -SUMMARY = "Just-In-Time Compiler for Lua" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22" -HOMEPAGE = "http://luajit.org" - -PV .= "+git${SRCPV}" -SRCREV = "02b521981a1ab919ff2cd4d9bcaee80baf77dce2" -SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http \ - file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ - file://clang.patch \ -" - -S = "${WORKDIR}/git" - -inherit pkgconfig binconfig siteinfo - -BBCLASSEXTEND = "native" - -# 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 = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}" - -# The lua makefiles expect the TARGET_SYS to be from uname -s -# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD -LUA_TARGET_OS = "Unknown" -LUA_TARGET_OS_darwin = "Darwin" -LUA_TARGET_OS_linux = "Linux" -LUA_TARGET_OS_linux-gnueabi = "Linux" -LUA_TARGET_OS_mingw32 = "Windows" - -# We don't want the lua buildsystem's compiler optimizations, or its -# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply -# to both host and target compiles -EXTRA_OEMAKE = "\ - Q= E='@:' \ - \ - CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \ - \ - 'TARGET_SYS=${LUA_TARGET_OS}' \ - \ - 'CC=${CC}' \ - 'TARGET_AR=${AR} rcus' \ - 'TARGET_CFLAGS=${CFLAGS}' \ - 'TARGET_LDFLAGS=${LDFLAGS}' \ - 'TARGET_SHLDFLAGS=${LDFLAGS}' \ - 'HOST_CC=${BUILD_CC}' \ - 'HOST_CFLAGS=${BUILD_CFLAGS}' \ - \ - 'PREFIX=${prefix}' \ - 'MULTILIB=${baselib}' \ - 'LDCONFIG=:' \ -" - -do_compile () { - oe_runmake -} - -# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the -# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those -# expectations. -EXTRA_OEMAKEINST = "\ - 'DESTDIR=${D}' \ - 'INSTALL_BIN=${D}${bindir}' \ - 'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \ - 'INSTALL_MAN=${D}${mandir}/man1' \ -" -do_install () { - oe_runmake ${EXTRA_OEMAKEINST} install - rmdir ${D}${datadir}/lua/5.* \ - ${D}${datadir}/lua \ - ${D}${libdir}/lua/5.* \ - ${D}${libdir}/lua -} - -PACKAGES += 'luajit-common' - -# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded -# paths are packaged regardless of what the libdir and datadir paths are. -FILES_${PN} += "${prefix}/${baselib} ${prefix}/share" -FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ - ${libdir}/libluajit-5.1.so.${PV} \ -" -FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \ - ${libdir}/libluajit-5.1.so \ - ${libdir}/pkgconfig/luajit.pc \ -" -FILES_luajit-common = "${datadir}/${BPN}-${PV}" - -# Aarch64/mips64/ppc/ppc64/riscv64 is not supported in this release -COMPATIBLE_HOST_aarch64 = "null" -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" -COMPATIBLE_HOST_powerpc = "null" -COMPATIBLE_HOST_powerpc64 = "null" -COMPATIBLE_HOST_powerpc64le = "null" -COMPATIBLE_HOST_riscv64 = "null" diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb new file mode 100644 index 0000000000..c4f8216480 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb @@ -0,0 +1,99 @@ +SUMMARY = "Just-In-Time Compiler for Lua" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d739bb9250a55c124a545b588fd76771" +HOMEPAGE = "http://luajit.org" + +PV = "2.1.0~beta3" +SRCREV = "0ad60ccbc3768fa8e3e726858adf261950edbc22" +SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ + file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ + file://clang.patch \ + " + +S = "${WORKDIR}/git" + +inherit pkgconfig binconfig siteinfo + +BBCLASSEXTEND = "native" + +# 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 = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}" + +# The lua makefiles expect the TARGET_SYS to be from uname -s +# Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD +LUA_TARGET_OS = "Unknown" +LUA_TARGET_OS_darwin = "Darwin" +LUA_TARGET_OS_linux = "Linux" +LUA_TARGET_OS_linux-gnueabi = "Linux" +LUA_TARGET_OS_mingw32 = "Windows" + +# We don't want the lua buildsystem's compiler optimizations, or its +# stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply +# to both host and target compiles +EXTRA_OEMAKE = "\ + Q= E='@:' \ + \ + CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \ + \ + 'TARGET_SYS=${LUA_TARGET_OS}' \ + \ + 'CC=${CC}' \ + 'TARGET_AR=${AR} rcus' \ + 'TARGET_CFLAGS=${CFLAGS}' \ + 'TARGET_LDFLAGS=${LDFLAGS}' \ + 'TARGET_SHLDFLAGS=${LDFLAGS}' \ + 'HOST_CC=${BUILD_CC}' \ + 'HOST_CFLAGS=${BUILD_CFLAGS}' \ + \ + 'PREFIX=${prefix}' \ + 'MULTILIB=${baselib}' \ + 'LDCONFIG=:' \ +" + +do_compile () { + oe_runmake +} + +# There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the +# '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those +# expectations. +EXTRA_OEMAKEINST = "\ + 'DESTDIR=${D}' \ + 'INSTALL_BIN=${D}${bindir}' \ + 'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \ + 'INSTALL_MAN=${D}${mandir}/man1' \ +" +do_install () { + oe_runmake ${EXTRA_OEMAKEINST} install + rmdir ${D}${datadir}/lua/5.* \ + ${D}${datadir}/lua \ + ${D}${libdir}/lua/5.* \ + ${D}${libdir}/lua +} + +PACKAGES += 'luajit-common' + +# See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded +# paths are packaged regardless of what the libdir and datadir paths are. +FILES_${PN} += "${prefix}/${baselib} ${prefix}/share" +FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \ + ${libdir}/libluajit-5.1.so.${PV} \ +" +FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \ + ${libdir}/libluajit-5.1.so \ + ${libdir}/pkgconfig/luajit.pc \ +" +FILES_luajit-common = "${datadir}/${BPN}-${PV}" + +# mips64/ppc/ppc64/riscv64 is not supported in this release +COMPATIBLE_HOST_mipsarchn32 = "null" +COMPATIBLE_HOST_mipsarchn64 = "null" +COMPATIBLE_HOST_powerpc = "null" +COMPATIBLE_HOST_powerpc64 = "null" +COMPATIBLE_HOST_powerpc64le = "null" +COMPATIBLE_HOST_riscv64 = "null" -- cgit v1.2.3-54-g00ecf