From 84e2747d2784f05ea027524f9d1c3c38ecdc354e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Jan 28 2022 05:25:49 +0000 Subject: Revert "Fix build failures due to https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck" This reverts commit 8822b49cdf553d0164b44e15176c38e1523622a2. This fix was incomplete. --- diff --git a/rpm/macros.d/macros.go-compilers-golang b/rpm/macros.d/macros.go-compilers-golang index 84d34b3..3b4a01d 100644 --- a/rpm/macros.d/macros.go-compilers-golang +++ b/rpm/macros.d/macros.go-compilers-golang @@ -29,11 +29,7 @@ # # %make GOBUILDFLAGS="%gobuildflags" # - -# Remove unsupported LDFLAGS -%golang_filter_ldflags %(echo "$LDFLAGS" | sed -e 's/-Wl,-z,relro//') - -%gobuildflags() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "%{golang_filter_ldflags} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x} +%gobuildflags() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x} # Turn off Go modules %gomodulesmode GO111MODULE=off @@ -51,4 +47,4 @@ ${workroot}${GOPATH:+:${GOPATH}} # Define commands for testing %gotestflags %{gocompilerflags} %gotestextldflags %__global_ldflags %{?__golang_extldflags} -%gotest() %{?gomodulesmode} go test %{gotestflags} -ldflags "%{golang_filter_ldflags} %{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**}; +%gotest() %{?gomodulesmode} go test %{gotestflags} -ldflags "${LDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};