From 13523acee676f77493b8e40d439b8b843ef87009 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 10 Jul 2022 11:44:00 +0200 Subject: [PATCH] remove patches and add build-id * remove all patches from downstream and add new proxy one based on downstream * add LDFLAGS to include build-id so building works fine * add missing golang prelink Signed-off-by: Toshaan Bharvani --- SPECS/golang.spec | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/SPECS/golang.spec b/SPECS/golang.spec index 674f868..978120e 100644 --- a/SPECS/golang.spec +++ b/SPECS/golang.spec @@ -77,16 +77,9 @@ License: BSD and Public Domain URL: http://golang.org/ Source0: https://storage.googleapis.com/golang/go%{go_version}.src.tar.gz Source1: powerel.go -Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch -Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch -Patch3: 0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch -Patch215: go1.5-zoneinfo_testing_only.patch -Patch221: fix_TestScript_list_std.patch -Patch1952381: rhbz1952381.patch -Patch222: remove_waitgroup_misuse_tests.patch -Patch223: remove_ed25519vectors_test.patch Source100: golang-gdbinit Source101: golang-prelink.conf +Patch1: disable-google-proxy-and-sumdb.patch %if !%{golang_bootstrap} BuildRequires: gcc-go >= 5 @@ -217,11 +210,6 @@ Requires: %{name} = %{version}-%{release} %prep %autosetup -p1 -n go -%patch215 -p1 -%patch221 -p1 -%patch1952381 -p1 -%patch222 -p1 -%patch223 -p1 cp %{SOURCE1} ./src/runtime/ @@ -246,8 +234,11 @@ export CC="gcc" export CC_FOR_TARGET="gcc" export GOOS=linux export GOARCH=%{gohostarch} +DEFAULT_GO_LD_FLAGS="" %if !%{external_linker} export GO_LDFLAGS="-linkmode internal" +%else +export GO_LDFLAGS="\"-extldflags=-Wl,-z,now,-z,relro\" $DEFAULT_GO_LD_FLAGS" %endif %if !%{cgo_enabled} export CGO_ENABLED=0 @@ -410,6 +401,7 @@ fi %dir %{gopath}/src/golang.org %dir %{gopath}/src/golang.org/x %{_sysconfdir}/gdbinit.d +%{_sysconfdir}/prelink.conf.d/golang.conf %files src -f go-src.list