diff --git a/README.md b/README.md index 67691da..42b3ad7 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ This list of officially supported platforms is available in the Node.js [BUILDIN * **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++`. * **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. +* **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. * **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". * **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". * **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) diff --git a/bin/build.sh b/bin/build.sh index 6dd666a..62eac9d 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -14,6 +14,7 @@ recipes=" \ musl \ armv6l \ armv6l-pre16 \ + arm64-glibc-217 \ x64-glibc-217 \ x64-pointer-compression \ x64-usdt \ diff --git a/recipes/arm64-glibc-217/Dockerfile b/recipes/arm64-glibc-217/Dockerfile new file mode 100644 index 0000000..78b0d55 --- /dev/null +++ b/recipes/arm64-glibc-217/Dockerfile @@ -0,0 +1,32 @@ +FROM centos:7 + +ARG GID=1000 +ARG UID=1000 + +RUN groupadd --gid $GID node \ + && adduser --gid $GID --uid $UID node + +RUN ulimit -n 1024 \ + && yum install -y epel-release \ + && yum install -y centos-release-scl-rh \ + && yum upgrade -y \ + && yum install -y \ + git \ + curl \ + make \ + python2 \ + python3 \ + ccache \ + xz-utils \ + devtoolset-9 \ + glibc-devel + +COPY --chown=node:node run.sh /home/node/run.sh + +VOLUME /home/node/.ccache +VOLUME /out +VOLUME /home/node/node.tar.xz + +USER node + +ENTRYPOINT [ "/home/node/run.sh" ] diff --git a/recipes/arm64-glibc-217/run.sh b/recipes/arm64-glibc-217/run.sh new file mode 100755 index 0000000..bf963aa --- /dev/null +++ b/recipes/arm64-glibc-217/run.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +set -e +set -x + +release_urlbase="$1" +disttype="$2" +customtag="$3" +datestring="$4" +commit="$5" +fullversion="$6" +source_url="$7" +config_flags="" + +cd /home/node + +tar -xf node.tar.xz +cd "node-${fullversion}" + +export CC="ccache gcc" +export CXX="ccache g++" +export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v) + +. /opt/rh/devtoolset-9/enable + +make -j$(getconf _NPROCESSORS_ONLN) binary V= \ + DESTCPU="arm64" \ + ARCH="arm64" \ + VARIATION="glibc-217" \ + DISTTYPE="$disttype" \ + CUSTOMTAG="$customtag" \ + DATESTRING="$datestring" \ + COMMIT="$commit" \ + RELEASE_URLBASE="$release_urlbase" \ + CONFIG_FLAGS="$config_flags" + +mv node-*.tar.?z /out/ diff --git a/recipes/arm64-glibc-217/should-build.sh b/recipes/arm64-glibc-217/should-build.sh new file mode 100755 index 0000000..2453d49 --- /dev/null +++ b/recipes/arm64-glibc-217/should-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash -xe + +__dirname=$1 +fullversion=$2 + +. ${__dirname}/_decode_version.sh + +decode "$fullversion" + +test "$major" -ge "18"