From 32199600a2dcd421aa08bd8d6c6318d766269522 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Mar 31 2020 17:24:43 +0000 Subject: Fix LDFLAGS macros typos Signed-off-by: Robert-André Mauchin --- diff --git a/rpm/macros.d/macros.go-compilers-gcc b/rpm/macros.d/macros.go-compilers-gcc index 7440077..609c464 100644 --- a/rpm/macros.d/macros.go-compilers-gcc +++ b/rpm/macros.d/macros.go-compilers-gcc @@ -26,9 +26,9 @@ # Define commands for building %gobuild(o:) %{expand: %{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} \\ -go build -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-}%{?currentgoldflags} %__global_ldflags %{?__golang_extldflags}" -a -v -x %{?**}; +go build -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-%{?currentgoldflags} %__global_ldflags} %{?__golang_extldflags}" -a -v -x %{?**}; } # Define commands for testing -%gotestflags -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-}%{?currentgoldflags} %__global_ldflags %{?__golang_extldflags}" +%gotestflags -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS ${LDFLAGS:-%{?currentgoldflags} %__global_ldflags} %{?__golang_extldflags}" %gotest() go test %{gotestflags} %{?**}; diff --git a/rpm/macros.d/macros.go-rpm b/rpm/macros.d/macros.go-rpm index 392b56b..f773f34 100644 --- a/rpm/macros.d/macros.go-rpm +++ b/rpm/macros.d/macros.go-rpm @@ -350,7 +350,7 @@ local function process(suffix) zsuffix = "-z " .. suffix .. " " end print(rpm.expand('%goenv ' .. zsuffix .. myenvflags .. '\\n' .. - '%{?currentgoldflags:LDFLAGS="${LDFLAGS}%{?currentgoldflags}" }' .. + '%{?currentgoldflags:LDFLAGS="${LDFLAGS} %{?currentgoldflags}" }' .. '%{?gotestflags:GO_TEST_FLAGS="%{gotestflags}" }' .. '%{?gotestextldflags:GO_TEST_EXT_LD_FLAGS="%{gotestextldflags}" }' .. 'go-rpm-integration check ' .. mycheckflags .. '\\n'))