nodejs: ppc build fixes + generalize cross for all architectures
[ci skip]
This commit is contained in:
parent
42c58a73e8
commit
5683e188a5
1 changed files with 26 additions and 5 deletions
|
@ -32,12 +32,20 @@ replaces="iojs>=0"
|
||||||
conflicts="nodejs-lts"
|
conflicts="nodejs-lts"
|
||||||
provides="nodejs-runtime-0_1"
|
provides="nodejs-runtime-0_1"
|
||||||
|
|
||||||
|
if [ "$XBPS_WORDSIZE" -ne "$XBPS_TARGET_WORDSIZE" ]; then
|
||||||
|
nocross="host and target must have the same pointer size"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# v8 requires libatomic on ppc*/s390x/mips*
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arm*)
|
mips*|ppc*) makedepends+=" libatomic-devel" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# also need it on host when it's one of those archs
|
||||||
case "$XBPS_MACHINE" in
|
case "$XBPS_MACHINE" in
|
||||||
x86_64*|aarch64*)
|
mips*|ppc*) hostmakedepends+=" libatomic-devel" ;;
|
||||||
nocross="Can't cross-compile to 32bit-host from 64bit-host";;
|
*) ;;
|
||||||
esac ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
@ -46,10 +54,23 @@ do_configure() {
|
||||||
export LD="$CXX"
|
export LD="$CXX"
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
arm*) _args="--dest-cpu=arm" ;;
|
||||||
aarch64*) _args="--dest-cpu=arm64" ;;
|
aarch64*) _args="--dest-cpu=arm64" ;;
|
||||||
ppc64*) _args="--dest-cpu=ppc64" ;;
|
ppc64*) _args="--dest-cpu=ppc64" ;;
|
||||||
|
ppc*) _args="--dest-cpu=ppc" ;;
|
||||||
|
mipsel*) _args="--dest-cpu=mipsel" ;;
|
||||||
|
mips*) _args="--dest-cpu=mips" ;;
|
||||||
|
i686*) _args="--dest-cpu=x86" ;;
|
||||||
|
x86_64*) _args="--dest-cpu=x86_64" ;;
|
||||||
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
|
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
|
||||||
esac
|
esac
|
||||||
|
# this is necessary - for example, normally compiling from ppc64le
|
||||||
|
# to ppc64 or from glibc to musl is considered non-cross-compiling
|
||||||
|
# by the build system, because it's technically the same architecture
|
||||||
|
#
|
||||||
|
# that results in the toolset built for target only, and attempting
|
||||||
|
# to execute it within the build system fails
|
||||||
|
_args+=" --cross-compiling"
|
||||||
fi
|
fi
|
||||||
./configure --prefix=/usr --shared-zlib \
|
./configure --prefix=/usr --shared-zlib \
|
||||||
$(vopt_if icu --with-intl=system-icu) \
|
$(vopt_if icu --with-intl=system-icu) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue