From 76bab8b92521b6a4900d6d05280440dc454a1cfc Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Mon, 17 Jun 2024 13:52:35 +0000 Subject: [PATCH] fix: arm64 build --- Dockerfile.linuxcross | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Dockerfile.linuxcross b/Dockerfile.linuxcross index 35ab0c3e..cb6fa172 100644 --- a/Dockerfile.linuxcross +++ b/Dockerfile.linuxcross @@ -4,26 +4,22 @@ USER root:root WORKDIR /root/pkg-fetch/ ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y \ - curl \ - software-properties-common \ - ca-certificates \ - gnupg \ - binutils \ - g++-10 \ - git \ - make \ - patch \ - python3 \ - python3-distutils \ - crossbuild-essential-arm64 +RUN apt-get update +RUN apt-get install -y curl software-properties-common ca-certificates gnupg # Install Node.js 20 RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs +RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ + apt-get update && \ + apt-get install -y binutils g++-10 git make patch python3 python3-distutils + ARG TARGET_TOOLCHAIN_ARCH +RUN [ `uname -m` = ${TARGET_TOOLCHAIN_ARCH} ] || \ + apt-get install -y binutils-${TARGET_TOOLCHAIN_ARCH}-linux-gnu g++-10-${TARGET_TOOLCHAIN_ARCH}-linux-gnu + ENV CC=${TARGET_TOOLCHAIN_ARCH}-linux-gnu-gcc-10 ENV CXX=${TARGET_TOOLCHAIN_ARCH}-linux-gnu-g++-10 ENV AR=${TARGET_TOOLCHAIN_ARCH}-linux-gnu-ar