mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 21:57:02 +02:00
LuaJIT: simplify cross-compiling/wordsize match logic
This commit is contained in:
parent
fed4493af0
commit
4fe7159591
1 changed files with 7 additions and 31 deletions
|
@ -13,38 +13,14 @@ homepage="http://www.luajit.org"
|
|||
distfiles="http://luajit.org/download/${pkgname}-${_dist_version}.tar.gz"
|
||||
checksum=1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3
|
||||
|
||||
if [ "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
hostmakedepends+=" gcc-multilib"
|
||||
fi
|
||||
|
||||
_cross_cc="cc"
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# cross toolchains are only for x86_64, ppc64 and i686 hosts
|
||||
# luajit needs matching bitness for host and target
|
||||
# on x86_64 we can multilib, on others we can't
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64)
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*) ;;
|
||||
arm*|i686*|mips*|ppc*) _cross_cc="cc -m32";;
|
||||
esac
|
||||
;;
|
||||
ppc64*|x86_64-musl)
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*) ;;
|
||||
arm*|i686*|mips*|ppc*)
|
||||
broken="Mismatched bitness on non-multilib host"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
i686*)
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|ppc64*|aarch64*)
|
||||
broken="Mismatched bitness on non-multilib host"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
if [ "$CROSS_BUILD" -a "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
hostmakedepends+=" gcc-multilib"
|
||||
_cross_cc="cc -m32"
|
||||
else
|
||||
broken="Host and target wordsize must match"
|
||||
fi
|
||||
fi
|
||||
|
||||
# the ppc64 patchset subtly breaks ppc, needs investigation; for
|
||||
|
|
Loading…
Add table
Reference in a new issue