Skip to content

Commit 22249bf

Browse files
author
Rasmus Thomsen
committed
nodejs: fix cross to aarch64
Also mark x86_64* -> arm* as broken, we can only build 32bit -> 32bit (i686 -> arm*) , see https://github.com/nodejs/node/blob/master/deps/v8/src/base/build_config.h#L149
1 parent 1f349e7 commit 22249bf

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

srcpkgs/nodejs/template

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Template file for 'nodejs'
22
pkgname=nodejs
33
version=10.15.0
4-
revision=1
4+
revision=2
55
wrksrc="node-v${version}"
6-
hostmakedepends="pkg-config python $(vopt_if icu icu)"
6+
# Need these for host v8 for torque, see https://github.com/nodejs/node/pull/21079
7+
hostmakedepends="pkg-config python zlib-devel $(vopt_if icu icu-devel)
8+
$(vopt_if ssl libressl-devel) $(vopt_if libuv libuv-devel)
9+
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
10+
$(vopt_if cares c-ares-devel)"
711
makedepends="zlib-devel python-devel $(vopt_if icu icu-devel)
812
$(vopt_if ssl libressl-devel) $(vopt_if libuv libuv-devel)
913
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
@@ -14,7 +18,6 @@ license="MIT"
1418
homepage="https://nodejs.org/"
1519
distfiles="${homepage}/dist/v${version}/node-v${version}.tar.gz"
1620
checksum=dbe467e3dabb6854fcb0cd96e04082268cb1e313ce97a4b7100b2ed152b0a0ab
17-
nocross="https://build.voidlinux.org/builders/armv7l_builder/builds/13788/steps/shell_3/logs/stdio"
1821

1922
build_options="ssl libuv http_parser icu nghttp2 cares"
2023
desc_option_ssl="Enable shared libressl"
@@ -32,10 +35,11 @@ provides="nodejs-runtime-0_1"
3235
do_configure() {
3336
local _args
3437

35-
export LD="$CXX"
38+
export LD="$CC"
39+
export LDXX="$CXX"
3640
if [ "$CROSS_BUILD" ]; then
3741
case "$XBPS_TARGET_MACHINE" in
38-
arm*) _args="--dest-cpu=arm --without-snapshot" ;;
42+
arm*) msg_error "Can only build Node for ARMv[5-7] from a 32-bit host" ;;
3943
aarch64*) _args="--dest-cpu=arm64 --without-snapshot" ;;
4044
*) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}\n" ;;
4145
esac
@@ -50,9 +54,9 @@ do_configure() {
5054
}
5155
do_build() {
5256
if [ "$CROSS_BUILD" ]; then
53-
make LD="$CXX" LDFLAGS+=-ldl ${makejobs} PORTABLE=1 V=1
57+
make LD="$CC" LDXX="$CXX" LDFLAGS+=-ldl ${makejobs} PORTABLE=1 V=1
5458
else
55-
make LD="$CXX" LDFLAGS+=-ldl ${makejobs} V=1
59+
make LD="$CC" LDXX="$CXX" LDFLAGS+=-ldl ${makejobs} V=1
5660
fi
5761
}
5862
do_install() {

0 commit comments

Comments
 (0)