Skip to content

Commit 70c83f3

Browse files
committed
Add arm64-glibc-217 recipe
1 parent f848e8d commit 70c83f3

File tree

6 files changed

+85
-0
lines changed

6 files changed

+85
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This list of officially supported platforms is available in the Node.js [BUILDIN
1414

1515
* **linux-x64-musl**: Linux x64 binaries compiled against [musl libc](https://www.musl-libc.org/) version 1.1.20. Primarily useful for users of Alpine Linux 3.9 and later. Linux x64 with musl is considered "Experimental" by Node.js but the Node.js test infrastructure includes some Alpine test servers so support is generally good. These Node.js builds require the `libstdc++` package to be installed on Alpine Linux, which is not installed by default. You can add this by running `apk add libstdc++`.
1616
* **linux-x64-glibc-217**: Linux x64, compiled with glibc 2.17 to support [older Linux distros](https://en.wikipedia.org/wiki/Glibc#Version_history), QNAP QTS 4.x and 5.x, and Synology DSM 7, and other environments where a newer glibc is unavailable.
17+
* **linux-arm64-glibc-217**: Linux arm64, compiled with glibc 2.17 to support [older Linux distros](https://en.wikipedia.org/wiki/Glibc#Version_history), QNAP QTS 4.x and 5.x, and Synology DSM 7, and other environments where a newer glibc is unavailable.
1718
* **linux-x86**: Linux x86 (32-bit) binaries compiled against libc 2.17, similar to the way the official [linux-x64 binaries are produced](https://github.com/nodejs/node/blob/master/BUILDING.md#official-binary-platforms-and-toolchains). 32-bit Linux binaries were dropped for Node.js 10 and 32-bit support is now considered "Experimental".
1819
* **linux-armv6l**: Linux ARMv6 binaries, cross-compiled on Ubuntu 16.04 with a [custom GCC 6 toolchain](https://github.com/rvagg/rpi-newer-crosstools) (for Node.js versions earlier than 16) or Ubuntu 18.04 with a [custom GCC 8 toolchain](https://github.com/rvagg/rpi-newer-crosstools) (for Node.js 16 and later) in a similar manner to the official linux-armv7l binaries. Binaries are optimized for `armv6zk` which is suitable for Raspberry Pi devices (1, 1+ and Zero in particular). ARMv6 binaries were dropped from Node.js 12 and ARMv6 support is now considered "Experimental".
1920
* **riscv64**: Linux riscv64 (RISC-V), cross compiled on Ubuntu 20.04 with the toolchain which the Adoptium project uses (for now...). Built with --openssl-no-asm (Should be with --with-intl=none but that gets overriden)

bin/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ recipes=" \
1414
musl \
1515
armv6l \
1616
armv6l-pre16 \
17+
arm64-glibc-217 \
1718
x64-glibc-217 \
1819
x64-pointer-compression \
1920
x64-usdt \

recipes/arm64-glibc-217/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM centos:7
2+
3+
ARG GID=1000
4+
ARG UID=1000
5+
6+
RUN groupadd --gid $GID node \
7+
&& adduser --gid $GID --uid $UID node
8+
9+
COPY cloudlinux.repo /etc/yum.repos.d/cloudlinux.repo
10+
11+
RUN yum install -y epel-release \
12+
&& yum upgrade -y \
13+
&& yum install -y \
14+
git \
15+
curl \
16+
make \
17+
python2 \
18+
python3 \
19+
ccache \
20+
xz-utils \
21+
devtoolset-9 \
22+
glibc-devel
23+
24+
COPY --chown=node:node run.sh /home/node/run.sh
25+
26+
VOLUME /home/node/.ccache
27+
VOLUME /out
28+
VOLUME /home/node/node.tar.xz
29+
30+
USER node
31+
32+
ENTRYPOINT [ "/home/node/run.sh" ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[cloudlinux-sclo-devtoolset-9]
2+
name=Cloudlinux devtoolset-9
3+
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/aarch64/
4+
gpgcheck=0

recipes/arm64-glibc-217/run.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
release_urlbase="$1"
7+
disttype="$2"
8+
customtag="$3"
9+
datestring="$4"
10+
commit="$5"
11+
fullversion="$6"
12+
source_url="$7"
13+
config_flags=""
14+
15+
cd /home/node
16+
17+
tar -xf node.tar.xz
18+
cd "node-${fullversion}"
19+
20+
export CC="ccache gcc"
21+
export CXX="ccache g++"
22+
export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v)
23+
24+
. /opt/rh/devtoolset-9/enable
25+
26+
make -j$(getconf _NPROCESSORS_ONLN) binary V= \
27+
DESTCPU="arm64" \
28+
ARCH="arm64" \
29+
VARIATION="glibc-217" \
30+
DISTTYPE="$disttype" \
31+
CUSTOMTAG="$customtag" \
32+
DATESTRING="$datestring" \
33+
COMMIT="$commit" \
34+
RELEASE_URLBASE="$release_urlbase" \
35+
CONFIG_FLAGS="$config_flags"
36+
37+
mv node-*.tar.?z /out/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -xe
2+
3+
__dirname=$1
4+
fullversion=$2
5+
6+
. ${__dirname}/_decode_version.sh
7+
8+
decode "$fullversion"
9+
10+
test "$major" -ge "18"

0 commit comments

Comments
 (0)