Skip to content

Commit

Permalink
Support building on an arm64 host too
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Feb 3, 2025
1 parent 6ad8af5 commit 13a1354
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM debian:bookworm-slim

RUN set -eux; \
apt-get update; \
dpkgArch="$(dpkg --print-architecture)"; \
apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
Expand All @@ -12,6 +13,8 @@ RUN set -eux; \
libc6-dev \
make \
\
# these are all "arch:all" so we can just install all of them
libc6-dev-amd64-cross \
libc6-dev-arm64-cross \
libc6-dev-armel-cross \
libc6-dev-armhf-cross \
Expand All @@ -21,7 +24,9 @@ RUN set -eux; \
libc6-dev-riscv64-cross \
libc6-dev-s390x-cross \
\
gcc-aarch64-linux-gnu \
# the cross-compilers are particular about which architectures they build for, so for now we'll only support a host architecture of amd64 or arm64
$([ "$dpkgArch" = 'amd64' ] || echo 'gcc-x86-64-linux-gnu') \
$([ "$dpkgArch" = 'arm64' ] || echo 'gcc-aarch64-linux-gnu') \
gcc-arm-linux-gnueabi \
gcc-arm-linux-gnueabihf \
gcc-i686-linux-gnu \
Expand Down

0 comments on commit 13a1354

Please sign in to comment.