From 3a96c4961efa155257370cb0e378b72900330a57 Mon Sep 17 00:00:00 2001 From: jackgopack4 Date: Wed, 6 Nov 2024 09:29:30 -0500 Subject: [PATCH] remove buildmode==pie in favor of #726 --- Makefile | 2 +- cmd/builder/.goreleaser.yml | 1 - cmd/goreleaser/internal/configure.go | 13 ------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 7efc0f16..675a967a 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ ifeq (, $(shell command -v ocb 2>/dev/null)) [ "$${machine}" != x86_64 ] || machine=amd64 ;\ echo "Installing ocb ($${os}/$${machine}) at $(OTELCOL_BUILDER_DIR)";\ mkdir -p $(OTELCOL_BUILDER_DIR) ;\ - CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" -buildmode=pie go.opentelemetry.io/collector/cmd/builder@v$(OTELCOL_BUILDER_VERSION) ;\ + CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" go.opentelemetry.io/collector/cmd/builder@v$(OTELCOL_BUILDER_VERSION) ;\ mv $$(go env GOPATH)/bin/builder $(OTELCOL_BUILDER) ;\ } else diff --git a/cmd/builder/.goreleaser.yml b/cmd/builder/.goreleaser.yml index 6fbe2f74..0676967e 100644 --- a/cmd/builder/.goreleaser.yml +++ b/cmd/builder/.goreleaser.yml @@ -8,7 +8,6 @@ version: 2 builds: - flags: - -trimpath - - -buildmode=pie ldflags: - -s -w -X go.opentelemetry.io/collector/cmd/builder/internal.version={{ .Version }} env: diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index b4e821e1..eef7696b 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -40,19 +40,6 @@ var ( K8sArchs = []string{"amd64", "arm64", "ppc64le", "s390x"} ) -// Copied from go/src/internal/platform/supported.go, see: -// https://cs.opensource.google/go/go/+/d7fcb5cf80953f1d63246f1ae9defa60c5ce2d76:src/internal/platform/supported.go;l=222 -func InternalLinkPIESupported(goos, goarch string) bool { - switch goos + "/" + goarch { - case "android/arm64", - "darwin/amd64", "darwin/arm64", - "linux/amd64", "linux/arm64", "linux/ppc64le", - "windows/386", "windows/amd64", "windows/arm", "windows/arm64": - return true - } - return false -} - func Generate(dist string) config.Project { return config.Project{ ProjectName: "opentelemetry-collector-releases",