1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/testing/oauth2-proxy/make-dont-disable-cgo.patch
Kevin Daudt 7496de4a3d testing/oauth2-proxy: enable cgo to fix rv64
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.
2024-03-02 07:36:24 +00:00

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