File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -1675,27 +1675,8 @@ func (ctxt *Link) hostlink() {
1675
1675
altLinker = "lld"
1676
1676
}
1677
1677
1678
- if ctxt .Arch .InFamily (sys .ARM64 ) && buildcfg .GOOS == "linux" {
1679
- // On ARM64, the GNU linker will fail with
1680
- // -znocopyreloc if it thinks a COPY relocation is
1681
- // required. Switch to gold.
1682
- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962
1683
- // https://go.dev/issue/22040
1684
- altLinker = "gold"
1685
-
1686
- // If gold is not installed, gcc will silently switch
1687
- // back to ld.bfd. So we parse the version information
1688
- // and provide a useful error if gold is missing.
1689
- name , args := flagExtld [0 ], flagExtld [1 :]
1690
- args = append (args , "-fuse-ld=gold" , "-Wl,--version" )
1691
- cmd := exec .Command (name , args ... )
1692
- if out , err := cmd .CombinedOutput (); err == nil {
1693
- if ! bytes .Contains (out , []byte ("GNU gold" )) {
1694
- log .Fatalf ("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s" , out )
1695
- }
1696
- }
1697
- }
1698
1678
}
1679
+
1699
1680
if ctxt .Arch .Family == sys .ARM64 && buildcfg .GOOS == "freebsd" {
1700
1681
// Switch to ld.bfd on freebsd/arm64.
1701
1682
altLinker = "bfd"
You can’t perform that action at this time.
0 commit comments