mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update golang and enable MPTCP by default
This commit is contained in:
parent
e22b863f26
commit
dfaa6ba1f0
5 changed files with 31 additions and 56 deletions
|
@ -1,48 +0,0 @@
|
|||
From 5ccf9f47bf4f5ba53e0ab7338a7fd4626714cfb2 Mon Sep 17 00:00:00 2001
|
||||
From: Jeffery To <jeffery.to@gmail.com>
|
||||
Date: Tue, 23 Nov 2021 15:05:37 +0800
|
||||
Subject: [PATCH] cmd/link: use gold on ARM/ARM64 only if gold is available
|
||||
|
||||
COPY relocation handling on ARM/ARM64 has been fixed in recent versions
|
||||
of the GNU linker. This switches to gold only if gold is available.
|
||||
|
||||
Fixes #22040.
|
||||
---
|
||||
src/cmd/link/internal/ld/lib.go | 19 +++++++------------
|
||||
1 file changed, 7 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/src/cmd/link/internal/ld/lib.go
|
||||
+++ b/src/cmd/link/internal/ld/lib.go
|
||||
@@ -1535,25 +1535,20 @@ func (ctxt *Link) hostlink() {
|
||||
}
|
||||
|
||||
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" {
|
||||
- // On ARM, the GNU linker will generate COPY relocations
|
||||
- // even with -znocopyreloc set.
|
||||
+ // On ARM, older versions of 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.
|
||||
+ // On ARM64, older versions of 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.
|
||||
+ // In both cases, switch to gold if gold is available.
|
||||
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 bytes.Contains(out, []byte("GNU gold")) {
|
||||
+ altLinker = "gold"
|
||||
}
|
||||
}
|
||||
}
|
11
golang/golang/patches/001-default-enable-mptcp.patch
Normal file
11
golang/golang/patches/001-default-enable-mptcp.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/src/net/dial.go 2023-05-06 10:33:54.275030044 +0200
|
||||
+++ b/src/net/dial.go 2023-05-06 10:34:29.218440686 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// For the moment, MultiPath TCP is not used by default
|
||||
// See go.dev/issue/56539
|
||||
- defaultMPTCPEnabled = false
|
||||
+ defaultMPTCPEnabled = true
|
||||
)
|
||||
|
||||
// mptcpStatus is a tristate for Multipath TCP, see go.dev/issue/56539
|
Loading…
Add table
Add a link
Reference in a new issue