Skip to content

Commit

Permalink
update riscv64 ubuntu to 22.04, the next lts version
Browse files Browse the repository at this point in the history
This update required changing the toolchain to one with a newer glibc.
  • Loading branch information
Marcelo Politzer committed Mar 27, 2023
1 parent 7b86471 commit 60d774e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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-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)
* **riscv64**: Linux riscv64 (RISC-V), cross compiled on Ubuntu 22.04 with the toolchain which the bootlin project provides (for now...). Built with --openssl-no-asm (Should be with --with-intl=none but that gets overriden)

"Experimental" status for Node.js is defined as:
> Experimental: May not compile or test suite may not pass. The core team does not create releases for these platforms. Test failures on experimental platforms do not block releases. Contributions to improve support for these platforms are welcome.
Expand Down
10 changes: 5 additions & 5 deletions recipes/riscv64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

ARG GID=1000
ARG UID=1000
Expand All @@ -13,15 +13,15 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install -y \
git \
g++-9 \
g++-9 \
curl \
make \
python3 \
python3-distutils \
python3-distutils \
ccache \
xz-utils
bzip2

RUN curl https://ci.adoptopenjdk.net/userContent/riscv/riscv_toolchain_linux64.tar.xz | tar xJf - -C /opt
RUN curl https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64-lp64d/tarballs/riscv64-lp64d--glibc--stable-2021.11-1.tar.bz2 | tar xjf - -C /opt

COPY --chown=node:node run.sh /home/node/run.sh

Expand Down
4 changes: 2 additions & 2 deletions recipes/riscv64/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ cd "node-${fullversion}"

export CC_host="ccache gcc-9"
export CXX_host="ccache g++-9"
export CC="ccache /opt/riscv_toolchain_linux/bin/riscv64-unknown-linux-gnu-gcc"
export CXX="ccache /opt/riscv_toolchain_linux/bin/riscv64-unknown-linux-gnu-g++"
export CC="ccache /opt/riscv64-lp64d--glibc--stable-2021.11-1/bin/riscv64-linux-gcc"
export CXX="ccache /opt/riscv64-lp64d--glibc--stable-2021.11-1/bin/riscv64-linux-g++"

make -j$(getconf _NPROCESSORS_ONLN) binary V= \
DESTCPU="riscv64" \
Expand Down

0 comments on commit 60d774e

Please sign in to comment.