From: Leo Yan <leo.yan@linaro.org>
To: openembedded-devel@lists.openembedded.org,
Sumit Garg <sumit.garg@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Loic Poulain <loic.poulain@linaro.org>
Subject: [meta-oe][PATCH v1 2/4] luajit: Add luajit 2.1.0-beta3 recipe
Date: Tue, 18 Feb 2020 13:25:42 +0800 [thread overview]
Message-ID: <20200218052544.9467-3-leo.yan@linaro.org> (raw)
In-Reply-To: <20200218052544.9467-1-leo.yan@linaro.org>
Since luajit 2.1.0-beta3 can support architecture aarch64 and the old
misses to support aarch64, this patch adds recipe for luajit
2.1.0-beta3 building.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
.../recipes-devtools/luajit/luajit_2.1.0.bb | 92 +++++++++++++++++++
1 file changed, 92 insertions(+)
create mode 100644 meta-oe/recipes-devtools/luajit/luajit_2.1.0.bb
diff --git a/meta-oe/recipes-devtools/luajit/luajit_2.1.0.bb b/meta-oe/recipes-devtools/luajit/luajit_2.1.0.bb
new file mode 100644
index 000000000..167b5d229
--- /dev/null
+++ b/meta-oe/recipes-devtools/luajit/luajit_2.1.0.bb
@@ -0,0 +1,92 @@
+SUMMARY = "Just-In-Time Compiler for Lua"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22"
+HOMEPAGE = "http://luajit.org"
+
+PV .= "+git${SRCPV}"
+SRCREV = "v2.1.0-beta3"
+SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1"
+
+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 is not supported in this release
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
--
2.17.1
next prev parent reply other threads:[~2020-02-18 5:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 5:25 [meta-oe][PATCH v1 0/4] eBPF tools: Add recipes Leo Yan
2020-02-18 5:25 ` [meta-oe][PATCH v1 1/4] Ply: Add recipe for git version Leo Yan
2020-02-20 15:41 ` Khem Raj
2020-02-21 9:03 ` Leo Yan
2020-02-18 5:25 ` Leo Yan [this message]
2020-02-19 23:07 ` [meta-oe][PATCH v1 2/4] luajit: Add luajit 2.1.0-beta3 recipe Khem Raj
2020-02-18 5:25 ` [meta-oe][PATCH v1 3/4] BCC: Add build recipe Leo Yan
2020-02-18 6:30 ` Khem Raj
2020-02-18 7:27 ` Leo Yan
2020-02-19 9:44 ` Leo Yan
2020-02-19 17:16 ` Khem Raj
2020-02-18 5:25 ` [meta-oe][PATCH v1 4/4] bpftrace: " Leo Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200218052544.9467-3-leo.yan@linaro.org \
--to=leo.yan@linaro.org \
--cc=daniel.thompson@linaro.org \
--cc=loic.poulain@linaro.org \
--cc=openembedded-devel@lists.openembedded.org \
--cc=sumit.garg@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.