40 строки
2.2 KiB
Diff
40 строки
2.2 KiB
Diff
From 518b1539d86b508ba65693459ae904dc828ae849 Mon Sep 17 00:00:00 2001
|
|
From: Pawel Winogrodzki <pawelwi@microsoft.com>
|
|
Date: Tue, 1 Mar 2022 16:34:45 -0800
|
|
Subject: [PATCH] Fixing_ldflags_for_Mariner
|
|
|
|
---
|
|
rpm/macros.d/macros.go-compilers-golang | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/rpm/macros.d/macros.go-compilers-golang b/rpm/macros.d/macros.go-compilers-golang
|
|
index b0ab4c4..ec6b198 100644
|
|
--- a/rpm/macros.d/macros.go-compilers-golang
|
|
+++ b/rpm/macros.d/macros.go-compilers-golang
|
|
@@ -29,7 +29,7 @@
|
|
#
|
|
# %make GOBUILDFLAGS="%gobuildflags"
|
|
#
|
|
-%gobuildflags() %{expand:%{gocompilerflags} -tags=\\"rpm_crashtraceback \\" -ldflags \\"${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'\\" -a -v -x}
|
|
+%gobuildflags() %{expand:%{gocompilerflags} -tags=\\"rpm_crashtraceback \\" -ldflags \\"%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'\\" -a -v -x}
|
|
|
|
# Turn off Go modules
|
|
%gomodulesmode GO111MODULE=off
|
|
@@ -40,11 +40,11 @@
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
|
|
%global _dwz_low_mem_die_limit 0
|
|
%{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} %{?gomodulesmode} \\
|
|
- go build %{?gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**};
|
|
+ go build %{?gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**};
|
|
}
|
|
${workroot}${GOPATH:+:${GOPATH}}
|
|
|
|
# Define commands for testing
|
|
%gotestflags %{gocompilerflags}
|
|
%gotestextldflags %__global_ldflags %{?__golang_extldflags}
|
|
-%gotest() %{?gomodulesmode} go test %{gotestflags} -ldflags "${LDFLAGS:-}%{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
|
|
+%gotest() %{?gomodulesmode} go test %{gotestflags} -ldflags "%{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
|
|
--
|
|
2.17.1
|
|
|