Accepting request 962202 from home:dirkmueller:Factory
- add dont-force-gold-on-arm64.patch (bsc#1183043) - drop binutils-gold dependency OBS-URL: https://build.opensuse.org/request/show/962202 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go1.18?expand=0&rev=7
This commit is contained in:
parent
adcaf5d758
commit
6c167fc6f6
33
dont-force-gold-on-arm64.patch
Normal file
33
dont-force-gold-on-arm64.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
--- go/src/cmd/link/internal/ld/lib.go
|
||||||
|
+++ go/src/cmd/link/internal/ld/lib.go
|
||||||
|
@@ -1391,30 +1391,6 @@
|
||||||
|
// Use lld to avoid errors from default linker (issue #38838)
|
||||||
|
altLinker = "lld"
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" {
|
||||||
|
- // On ARM, the GNU linker will generate COPY relocations
|
||||||
|
- // even with -znocopyreloc set.
|
||||||
|
- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962
|
||||||
|
- //
|
||||||
|
- // On ARM64, the GNU linker will fail instead of
|
||||||
|
- // generating COPY relocations.
|
||||||
|
- //
|
||||||
|
- // In both cases, switch to gold.
|
||||||
|
- altLinker = "gold"
|
||||||
|
-
|
||||||
|
- // If gold is not installed, gcc will silently switch
|
||||||
|
- // back to ld.bfd. So we parse the version information
|
||||||
|
- // and provide a useful error if gold is missing.
|
||||||
|
- name, args := flagExtld[0], flagExtld[1:]
|
||||||
|
- args = append(args, "-fuse-ld=gold", "-Wl,--version")
|
||||||
|
- cmd := exec.Command(name, args...)
|
||||||
|
- if out, err := cmd.CombinedOutput(); err == nil {
|
||||||
|
- if !bytes.Contains(out, []byte("GNU gold")) {
|
||||||
|
- log.Fatalf("ARM external linker must be gold (issue #15696), but is not: %s", out)
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
if ctxt.Arch.Family == sys.ARM64 && buildcfg.GOOS == "freebsd" {
|
||||||
|
// Switch to ld.bfd on freebsd/arm64.
|
@ -268,6 +268,12 @@ Tue Mar 15 17:42:07 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
|||||||
As a result, Syscall, Syscall6, Syscall9, Syscall12, Syscall15,
|
As a result, Syscall, Syscall6, Syscall9, Syscall12, Syscall15,
|
||||||
and Syscall18 are deprecated in favor of SyscallN.
|
and Syscall18 are deprecated in favor of SyscallN.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 9 17:03:28 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add dont-force-gold-on-arm64.patch (bsc#1183043)
|
||||||
|
- drop binutils-gold dependency
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 18 02:10:17 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
Fri Feb 18 02:10:17 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
||||||
|
|
||||||
|
17
go1.18.spec
17
go1.18.spec
@ -147,6 +147,8 @@ Source4: README.SUSE
|
|||||||
Source6: go.gdbinit
|
Source6: go.gdbinit
|
||||||
# We have to compile TSAN ourselves. boo#1052528
|
# We have to compile TSAN ourselves. boo#1052528
|
||||||
Source100: llvm-%{tsan_commit}.tar.xz
|
Source100: llvm-%{tsan_commit}.tar.xz
|
||||||
|
# PATCH-FIX-OPENSUSE: https://go-review.googlesource.com/c/go/+/391115
|
||||||
|
Patch7: dont-force-gold-on-arm64.patch
|
||||||
# PATCH-FIX-UPSTREAM marguerite@opensuse.org - find /usr/bin/go-5 when bootstrapping with gcc5-go
|
# PATCH-FIX-UPSTREAM marguerite@opensuse.org - find /usr/bin/go-5 when bootstrapping with gcc5-go
|
||||||
Patch8: gcc6-go.patch
|
Patch8: gcc6-go.patch
|
||||||
Patch9: gcc7-go.patch
|
Patch9: gcc7-go.patch
|
||||||
@ -169,22 +171,8 @@ BuildRequires: gcc-c++
|
|||||||
%endif
|
%endif
|
||||||
#BNC#818502 debug edit tool of rpm fails on i586 builds
|
#BNC#818502 debug edit tool of rpm fails on i586 builds
|
||||||
BuildRequires: rpm >= 4.11.1
|
BuildRequires: rpm >= 4.11.1
|
||||||
# Needed on arm aarch64 to avoid
|
|
||||||
# collect2: fatal error: cannot find 'ld'-
|
|
||||||
%ifarch %arm aarch64
|
|
||||||
BuildRequires: binutils-gold
|
|
||||||
%endif
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
# Needed on arm aarch64 to avoid
|
|
||||||
# collect2: fatal error: cannot find 'ld'-
|
|
||||||
%ifarch %arm aarch64
|
|
||||||
%if 0%{?is_opensuse}
|
|
||||||
Requires: binutils-gold
|
|
||||||
%else
|
|
||||||
Recommends: binutils-gold
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
Requires: gcc
|
Requires: gcc
|
||||||
Provides: go = %{version}
|
Provides: go = %{version}
|
||||||
Provides: go-devel = go%{version}
|
Provides: go-devel = go%{version}
|
||||||
@ -234,6 +222,7 @@ Go runtime race detector libraries. Install this package if you wish to use the
|
|||||||
%endif
|
%endif
|
||||||
# go
|
# go
|
||||||
%setup -q -n go
|
%setup -q -n go
|
||||||
|
%patch7 -p1
|
||||||
%if %{with gccgo}
|
%if %{with gccgo}
|
||||||
%if 0%{?gcc_go_version} == 6
|
%if 0%{?gcc_go_version} == 6
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user