summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-09-24 16:16:03 -0700
committerWilliam Hubbs <williamh@gentoo.org>2020-12-13 19:20:24 -0600
commit35539cb231ee30f419937e009b1f3d18ee1a9111 (patch)
treeee3539488a54ee8835436844487c1c42dda40ca4
parentnet-misc/networkmanager: arm64 stable (bug #759028) (diff)
downloadgentoo-35539cb231ee30f419937e009b1f3d18ee1a9111.tar.gz
gentoo-35539cb231ee30f419937e009b1f3d18ee1a9111.tar.bz2
gentoo-35539cb231ee30f419937e009b1f3d18ee1a9111.zip
dev-lang/luajit: Fix 2.0.5 cross-compilation build
luajit passes CFLAGS/LDFLAGS to both host and target builds. This breaks when the host cpu does not support the target flags e.g. using march=bdver4 in CFLAGS when cross-compiling for AMD on an Intel host. Instead, pass the flags in {HOST|TARGET}-{CFLAGS|LDFLAGS} which is supported by luajit [1]. [1] https://github.com/LuaJIT/LuaJIT/blob/master/doc/install.html#L607 Closes: https://github.com/gentoo/gentoo/pull/9970 Signed-off-by: Manoj Gupta <manojgupta@google.com> Signed-off-by: William Hubbs <williamh@gentoo.org>
-rw-r--r--dev-lang/luajit/luajit-2.0.5-r3.ebuild (renamed from dev-lang/luajit/luajit-2.0.5-r2.ebuild)7
-rw-r--r--dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild (renamed from dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild)0
2 files changed, 7 insertions, 0 deletions
diff --git a/dev-lang/luajit/luajit-2.0.5-r2.ebuild b/dev-lang/luajit/luajit-2.0.5-r3.ebuild
index 3dd7bad8037..5816d1feccf 100644
--- a/dev-lang/luajit/luajit-2.0.5-r2.ebuild
+++ b/dev-lang/luajit/luajit-2.0.5-r3.ebuild
@@ -43,10 +43,16 @@ _emake() {
PREFIX="${EPREFIX}/usr" \
MULTILIB="$(get_libdir)" \
DESTDIR="${D}" \
+ CFLAGS="" \
+ LDFLAGS="" \
HOST_CC="$(tc-getBUILD_CC)" \
+ HOST_CFLAGS="${BUILD_CPPFLAGS} ${BUILD_CFLAGS}" \
+ HOST_LDFLAGS="${BUILD_LDFLAGS}" \
STATIC_CC="$(tc-getCC)" \
DYNAMIC_CC="$(tc-getCC) -fPIC" \
TARGET_LD="$(tc-getCC)" \
+ TARGET_CFLAGS="${CPPFLAGS} ${CFLAGS}" \
+ TARGET_LDFLAGS="${LDFLAGS}" \
TARGET_AR="$(tc-getAR) rcus" \
BUILDMODE="$(usex static-libs mixed dynamic)" \
TARGET_STRIP="true" \
@@ -55,6 +61,7 @@ _emake() {
}
src_compile() {
+ tc-export_build_env
_emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
}
diff --git a/dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild b/dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild
index cb942e454d0..cb942e454d0 100644
--- a/dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild
+++ b/dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild