| |
@@ -29,7 +29,7 @@
|
| |
#
|
| |
# %make GOBUILDFLAGS="%gobuildflags"
|
| |
#
|
| |
- %gobuildflags() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags} %{?__golang_extldflags}'" -a -v -x}
|
| |
+ %gobuildflags() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${GOBUILDTAGS:-}" -ldflags "${GOLDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -linkmode=external -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x}
|
| |
|
| |
# Turn off Go modules
|
| |
%gomodulesmode GO111MODULE=off
|
| |
@@ -37,10 +37,6 @@
|
| |
# Define commands for building
|
| |
# BUILD_ID can be generated for golang build no matter of debuginfo
|
| |
%gobuild(o:) %{expand:
|
| |
- # https://pagure.io/go-rpm-macros/pull-request/38
|
| |
- # Most of the default LDFLAGS for Fedora are not supported so we don't want
|
| |
- # LDFLAGS to be automatically initialized with the Fedora flags.
|
| |
- %undefine _auto_set_build_flags
|
| |
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
|
| |
%global _dwz_low_mem_die_limit 0
|
| |
%{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} %{?gomodulesmode} \\
|
| |
@@ -52,6 +48,5 @@
|
| |
%gotestflags %{gocompilerflags}
|
| |
%gotestextldflags %{build_ldflags} %{?__golang_extldflags}
|
| |
%gotest() %{expand:
|
| |
- %undefine _auto_set_build_flags
|
| |
- %{?gomodulesmode} go test %{gotestflags} -ldflags "${LDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
|
| |
+ %{?gomodulesmode} go test %{gotestflags} -ldflags "${GOLDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
|
| |
}
|
| |
WIP
Needs change in packages.