mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 02:05:16 +03:00
For riscv64, go does not support internal linking with `-buildmode=pie`. Before go1.22, it was silently accepted, but since go1.22, it's failing to build. Unless there is a good reason, we prefer to build with CGO, so remove the hardcoded flag in the Makefile.
16 lines
724 B
Diff
16 lines
724 B
Diff
Fixes: -buildmode=pie requires external (cgo) linking, but cgo is not enabled
|
|
|
|
This is enforced on riscv64 since go 1.22
|
|
diff --git a/Makefile b/Makefile
|
|
index 41d01bf..b1d7e17 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -40,7 +40,7 @@ lint: validate-go-version
|
|
build: validate-go-version clean $(BINARY)
|
|
|
|
$(BINARY):
|
|
- CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -ldflags="-X main.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
|
|
+ $(GO) build -a -installsuffix cgo -ldflags="-X main.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
|
|
|
|
DOCKER_BUILD_PLATFORM ?= linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7
|
|
DOCKER_BUILD_RUNTIME_IMAGE ?= gcr.io/distroless/static:nonroot
|