Skip to content

Commit

Permalink
Merge pull request #4692 from twz123/gold-linker-arm
Browse files Browse the repository at this point in the history
Only require gold linker on ARM
  • Loading branch information
twz123 authored Jun 28, 2024
2 parents 2402ff0 + 03e8715 commit 6dd645a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
ARG BUILDIMAGE
FROM $BUILDIMAGE
RUN apk add --no-cache make gcc musl-dev binutils-gold

ARG TARGETARCH
RUN set -ex; \
# Need to use the gold linker on ARM, Go really wants to have it.
# https://github.com/golang/go/blob/go1.22.4/src/cmd/link/internal/ld/lib.go#L1622-L1641
case "$TARGETARCH" in \
arm*) binutils=binutils-gold ;; \
*) binutils=binutils ;; \
esac; \
apk add --no-cache make gcc musl-dev "$binutils"

ENV \
HOME="/run/k0s-build" \
Expand Down

0 comments on commit 6dd645a

Please sign in to comment.