Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions recipes/loong64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ARG GID=1000
ARG UID=1000

RUN addgroup --gid $GID node \
&& adduser --gid $GID --uid $UID --disabled-password --gecos node node

RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y \
adduser \
git \
g++-13 \
curl \
make \
python3 \
python3-distutils \
python3.10 \
ccache \
xz-utils
xz-utils \
g++-14-loongarch64-linux-gnu \
gcc-14-loongarch64-linux-gnu-base \
gcc-14-loongarch64-linux-gnu

RUN addgroup --gid $GID node \
&& adduser --gid $GID --uid $UID --disabled-password --gecos node node

RUN curl -L https://github.com/loongson/build-tools/releases/download/2024.11.01/x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz | tar xJf - -C /opt
RUN rm -f /usr/bin/python3
RUN ln -s /usr/bin/python3.10 /usr/bin/python3

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

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

export CC_host="ccache gcc-13"
export CXX_host="ccache g++-13"
export CC="ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc"
export CXX="ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-g++"
export CC="ccache /usr/bin/loongarch64-linux-gnu-gcc-14"
export CXX="ccache /usr/bin/loongarch64-linux-gnu-g++-14"

make -j$(getconf _NPROCESSORS_ONLN) binary V= \
DESTCPU="loong64" \
Expand Down
6 changes: 5 additions & 1 deletion recipes/loong64/should-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ fullversion=$2

decode "$fullversion"

test "$major" -ge "18" && test "$major" -lt "22"
(test "$major" -eq "18" && test "$minor" -ge "18") || \
(test "$major" -eq "20" && test "$minor" -ge "10") || \
(test "$major" -eq "21") || \
(test "$major" -eq "22" && test "$minor" -ge "14") || \
(test "$major" -ge "23")