From a99f7aa203858920120ce6be3b3fc376e6ed4915 Mon Sep 17 00:00:00 2001 From: cicadabear Date: Sat, 30 Mar 2024 04:18:08 +0800 Subject: [PATCH] add cross compile support for arm64 to amd64 (#888) --- docker/install_build_dependencies.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/install_build_dependencies.sh b/docker/install_build_dependencies.sh index 3bea316..9a3f51a 100644 --- a/docker/install_build_dependencies.sh +++ b/docker/install_build_dependencies.sh @@ -8,6 +8,7 @@ elif [ "$TARGETPLATFORM" == "linux/arm/v6" ] || [ "$TARGETPLATFORM" == "linux/ar dpkg --add-architecture armhf DEBIAN_ARCH='armhf' else + dpkg --add-architecture amd64 DEBIAN_ARCH='amd64' fi @@ -22,6 +23,10 @@ elif [ "$DEBIAN_ARCH" == "armhf" ]; then apt-get install -y \ g++-arm-linux-gnueabihf \ libc6-dev-armhf-cross +else + apt-get install -y \ + g++-x86-64-linux-gnu \ + libc6-dev-amd64-cross fi # Install Golang