Skip to content

Commit

Permalink
Import Debian changes 1.15~rc1-1
Browse files Browse the repository at this point in the history
golang-1.15 (1.15~rc1-1) unstable; urgency=medium

  [ Shengjing Zhu ]
  * Backport patches to fix the FPU ABI problems for mips32
    https://go-review.googlesource.com/c/go/+/237058/

  [ Dr. Tobias Quathamer ]
  * New upstream version 1.15~rc1
    - Refresh patches
    - net/http: Expect 100-continue panics in httputil.ReverseProxy.
      See golang/go#34902, fixes CVE-2020-15586
  • Loading branch information
toddy15 authored and Kevin Paul Herbert committed Sep 12, 2020
2 parents e3f187b + a52b139 commit f837f90
Show file tree
Hide file tree
Showing 203 changed files with 8,342 additions and 5,276 deletions.
5 changes: 4 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ Hitoshi Mitake <[email protected]>
Holden Huang <[email protected]>
Hong Ruiqi <[email protected]>
Hongfei Tan <[email protected]>
Hootsuite Inc.
Hsin-Ho Yeh <[email protected]>
Hu Keping <[email protected]>
Hugues Bruant <[email protected]>
Expand Down Expand Up @@ -934,7 +935,7 @@ Maya Rashish <[email protected]>
Mayank Kumar <[email protected]>
MediaMath, Inc
Meir Fischer <[email protected]>
Meng Zhuo <[email protected]>
Meng Zhuo <[email protected]> <[email protected]>
Meteor Development Group
Mhd Sulhan <[email protected]>
Micah Stetson <[email protected]>
Expand Down Expand Up @@ -1044,6 +1045,7 @@ Niels Widger <[email protected]>
Nigel Kerr <[email protected]>
Nik Nyby <[email protected]>
Nikhil Benesch <[email protected]>
Nikita Gillmann <[email protected]> <[email protected]>
Niklas Schnelle <[email protected]>
Niko Dziemba <[email protected]>
Nikolay Turpitko <[email protected]>
Expand Down Expand Up @@ -1397,6 +1399,7 @@ Upthere, Inc.
Uriel Mangado <[email protected]>
Vadim Grek <[email protected]>
Vadim Vygonets <[email protected]>
Vee Zhang <[email protected]> <[email protected]>
Vendasta
Veselkov Konstantin <[email protected]>
Victor Vrantchan <[email protected]>
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,7 @@ Kshitij Saraogi <[email protected]>
Kun Li <[email protected]>
Kunpei Sakai <[email protected]>
Kuntal Majumder <[email protected]>
Kush Patel <[email protected]>
Kyle Consalus <[email protected]>
Kyle Isom <[email protected]>
Kyle Jones <[email protected]>
Expand Down Expand Up @@ -1501,7 +1502,7 @@ Maxwell Krohn <[email protected]>
Maya Rashish <[email protected]>
Mayank Kumar <[email protected]>
Meir Fischer <[email protected]>
Meng Zhuo <[email protected]>
Meng Zhuo <[email protected]> <[email protected]>
Mhd Sulhan <[email protected]>
Micah Stetson <[email protected]>
Michael Anthony Knyszek <[email protected]>
Expand Down Expand Up @@ -1654,6 +1655,7 @@ Nigel Kerr <[email protected]>
Nigel Tao <[email protected]>
Nik Nyby <[email protected]>
Nikhil Benesch <[email protected]>
Nikita Gillmann <[email protected]> <[email protected]>
Nikita Kryuchkov <[email protected]>
Nikita Vanyasin <[email protected]>
Niklas Schnelle <[email protected]>
Expand Down Expand Up @@ -2195,6 +2197,7 @@ Vadim Grek <[email protected]>
Vadim Vygonets <[email protected]>
Val Polouchkine <[email protected]>
Valentin Vidic <[email protected]>
Vee Zhang <[email protected]> <[email protected]>
Vega Garcia Luis Alfonso <[email protected]>
Venil Noronha <[email protected]>
Veselkov Konstantin <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
go1.15beta1
go1.15rc1
3 changes: 0 additions & 3 deletions api/go1.15.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI = 2
pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI ideal-int
pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX = 14
pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX ideal-int
pkg go/printer, const StdFormat = 16
pkg go/printer, const StdFormat Mode
pkg go/types, type Config struct, UsesCgo bool
pkg math/big, method (*Int) FillBytes([]uint8) []uint8
pkg net, method (*Resolver) LookupIP(context.Context, string, string) ([]IP, error)
pkg net/url, method (*URL) EscapedFragment() string
Expand Down
14 changes: 14 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
golang-1.15 (1.15~rc1-1) unstable; urgency=medium

[ Shengjing Zhu ]
* Backport patches to fix the FPU ABI problems for mips32
https://go-review.googlesource.com/c/go/+/237058/

[ Dr. Tobias Quathamer ]
* New upstream version 1.15~rc1
- Refresh patches
- net/http: Expect 100-continue panics in httputil.ReverseProxy.
See https://github.com/golang/go/issues/34902, fixes CVE-2020-15586

-- Dr. Tobias Quathamer <[email protected]> Mon, 03 Aug 2020 21:22:44 +0200

golang-1.15 (1.15~beta1-2) unstable; urgency=medium

* Source-only upload.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
From: YunQiang Su <[email protected]>
Date: Tue, 9 Jun 2020 04:09:58 +0000
Subject: cmd/go, cmd/cgo: pass -mfp32 and -mhard/soft-float to MIPS GCC

For mips32 currently, we are using FP32, while the gcc may be FPXX,
which may generate .MIPS.abiflags and .gnu.attributes section with
value as FPXX. So the kernel will treat the exe as FPXX, and may
choose to use FR=1 FPU mode for it.
Currently, in Go, we use 2 lwc1 to load both half of a double value
to a pair of even-odd FPR. This behavior can only work with FR=0 mode.

In FR=1 mode, all of 32 FPR are 64bit. If we lwc1 the high-half of a double
value to an odd FPR, and try to use the previous even FPR to compute, the
real high-half of even FPR will be unpredicatable.
We set -mfp32 to force the gcc generate FP32 code and section value.

More details about FP32/FPXX/FP64 are explained in:
https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

When GOMIPS/GOMIPS64 is set as softfloat, we should also pass
-msoft-float to gcc.

Here we also add -mno-odd-spreg option, since Loongson's CPU cannot use
odd-number FR in FR=0 mode.

Fixes #39435

Change-Id: I54026ad416a815fe43a9261ebf6d02e5519c3930
---
src/cmd/cgo/gcc.go | 12 ++++++++++--
src/cmd/cgo/main.go | 4 +++-
src/cmd/go/internal/work/exec.go | 14 ++++++++++++--
3 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index a59534e..d1bdee8 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -1548,9 +1548,17 @@ func (p *Package) gccMachine() []string {
case "s390x":
return []string{"-m64"}
case "mips64", "mips64le":
- return []string{"-mabi=64"}
+ if gomips64 == "hardfloat" {
+ return []string{"-mabi=64", "-mhard-float"}
+ } else if gomips64 == "softfloat" {
+ return []string{"-mabi=64", "-msoft-float"}
+ }
case "mips", "mipsle":
- return []string{"-mabi=32"}
+ if gomips == "hardfloat" {
+ return []string{"-mabi=32", "-mfp32", "-mhard-float", "-mno-odd-spreg"}
+ } else if gomips == "softfloat" {
+ return []string{"-mabi=32", "-msoft-float"}
+ }
}
return nil
}
diff --git a/src/cmd/cgo/main.go b/src/cmd/cgo/main.go
index 5a7bb3f..e0fede8 100644
--- a/src/cmd/cgo/main.go
+++ b/src/cmd/cgo/main.go
@@ -227,7 +227,7 @@ var gccgoMangleCheckDone bool
var gccgoNewmanglingInEffect bool
var importRuntimeCgo = flag.Bool("import_runtime_cgo", true, "import runtime/cgo in generated code")
var importSyscall = flag.Bool("import_syscall", true, "import syscall in generated code")
-var goarch, goos string
+var goarch, goos, gomips, gomips64 string

func main() {
objabi.AddVersionFlag() // -V
@@ -376,6 +376,8 @@ func newPackage(args []string) *Package {
if s := os.Getenv("GOOS"); s != "" {
goos = s
}
+ gomips = objabi.GOMIPS
+ gomips64 = objabi.GOMIPS64
ptrSize := ptrSizeMap[goarch]
if ptrSize == 0 {
fatalf("unknown ptrSize for $GOARCH %q", goarch)
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
index 071c9d2..347a060 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -2488,9 +2488,19 @@ func (b *Builder) gccArchArgs() []string {
case "s390x":
return []string{"-m64", "-march=z196"}
case "mips64", "mips64le":
- return []string{"-mabi=64"}
+ args := []string{"-mabi=64"}
+ if cfg.GOMIPS64 == "hardfloat" {
+ return append(args, "-mhard-float")
+ } else if cfg.GOMIPS64 == "softfloat" {
+ return append(args, "-msoft-float")
+ }
case "mips", "mipsle":
- return []string{"-mabi=32", "-march=mips32"}
+ args := []string{"-mabi=32", "-march=mips32"}
+ if cfg.GOMIPS == "hardfloat" {
+ return append(args, "-mhard-float", "-mfp32", "-mno-odd-spreg")
+ } else if cfg.GOMIPS == "softfloat" {
+ return append(args, "-msoft-float")
+ }
case "ppc64":
if cfg.Goos == "aix" {
return []string{"-maix64"}
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0001-Disable-test-for-UserHomeDir.patch
0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch
0003-cmd-go-cmd-cgo-pass-mfp32-and-mhard-soft-float-to-MI.patch
4 changes: 2 additions & 2 deletions doc/contribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h3 id="config_git_auth">Step 2: Configure git authentication</h3>
a Git server hosted by Google.
Authentication on the web server is made through your Google account, but
you also need to configure <code>git</code> on your computer to access it.
Follow this steps:
Follow these steps:
</p>

<ol>
Expand Down Expand Up @@ -310,7 +310,7 @@ <h3 id="check_tracker">Check the issue tracker</h3>
<b>NeedsDecision</b>: the issue is relatively well understood, but the
Go team hasn't yet decided the best way to address it.
It would be better to wait for a decision before writing code.
If you are interested on working on an issue in this state,
If you are interested in working on an issue in this state,
feel free to "ping" maintainers in the issue's comments
if some time has passed without a decision.
</li>
Expand Down
2 changes: 1 addition & 1 deletion doc/editors.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2 id="options">Options</h2>

<ul>
<li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go">Visual Studio Code</a>:
<li><a href="https://marketplace.visualstudio.com/items?itemName=golang.go">Visual Studio Code</a>:
Go extension provides support for the Go programming language</li>
<li><a href="https://www.jetbrains.com/go">GoLand</a>: GoLand is distributed either as a standalone IDE
or as a plugin for IntelliJ IDEA Ultimate</li>
Expand Down
12 changes: 8 additions & 4 deletions doc/effective_go.html
Original file line number Diff line number Diff line change
Expand Up @@ -2336,10 +2336,9 @@ <h3 id="interface_methods">Interfaces and methods</h3>
</p>
<p>
For brevity, let's ignore POSTs and assume HTTP requests are always
GETs; that simplification does not affect the way the handlers are
set up. Here's a trivial but complete implementation of a handler to
count the number of times the
page is visited.
GETs; that simplification does not affect the way the handlers are set up.
Here's a trivial implementation of a handler to count the number of times
the page is visited.
</p>
<pre>
// Simple counter server.
Expand All @@ -2355,6 +2354,11 @@ <h3 id="interface_methods">Interfaces and methods</h3>
<p>
(Keeping with our theme, note how <code>Fprintf</code> can print to an
<code>http.ResponseWriter</code>.)
In a real server, access to <code>ctr.n</code> would need protection from
concurrent access.
See the <code>sync</code> and <code>atomic</code> packages for suggestions.
</p>
<p>
For reference, here's how to attach such a server to a node on the URL tree.
</p>
<pre>
Expand Down
25 changes: 10 additions & 15 deletions doc/gccgo_install.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,13 @@ <h2 id="Releases">Releases</h2>
<h2 id="Source_code">Source code</h2>

<p>
If you cannot use a release, or prefer to build gccgo for
yourself,
the gccgo source code is accessible via Subversion. The
GCC web site
has <a href="https://gcc.gnu.org/svn.html">instructions for getting the
GCC source code</a>. The gccgo source code is included. As a
convenience, a stable version of the Go support is available in
a branch of the main GCC code
repository: <code>svn://gcc.gnu.org/svn/gcc/branches/gccgo</code>.
If you cannot use a release, or prefer to build gccgo for yourself, the
gccgo source code is accessible via Git. The GCC web site has
<a href="https://gcc.gnu.org/git.html">instructions for getting the GCC
source code</a>. The gccgo source code is included. As a convenience, a
stable version of the Go support is available in the
<code>devel/gccgo</code> branch of the main GCC code repository:
<code>git://gcc.gnu.org/git/gcc.git</code>.
This branch is periodically updated with stable Go compiler sources.
</p>

Expand Down Expand Up @@ -139,13 +137,10 @@ <h3 id="Gold">Gold</h3>
</p>

<pre>
cvs -z 9 -d :pserver:[email protected]:/cvs/src login
[password is "anoncvs"]
[The next command will create a directory named src, not binutils]
cvs -z 9 -d :pserver:[email protected]:/cvs/src co binutils
git clone git://sourceware.org/git/binutils-gdb.git
mkdir binutils-objdir
cd binutils-objdir
../src/configure --enable-gold=default --prefix=/opt/gold
../binutils-gdb/configure --enable-gold=default --prefix=/opt/gold
make
make install
</pre>
Expand Down Expand Up @@ -176,7 +171,7 @@ <h3 id="Build_commands">Build commands</h3>
</p>

<pre>
svn checkout svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo
git clone --branch devel/gccgo git://gcc.gnu.org/git/gcc.git gccgo
mkdir objdir
cd objdir
../gccgo/configure --prefix=/opt/gccgo --enable-languages=c,c++,go --with-ld=/opt/gold/bin/ld
Expand Down
10 changes: 9 additions & 1 deletion doc/go1.14.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,15 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
certificate, and letting the package automatically select the best one.
Note that the performance of this selection is going to be poor unless the
<a href="/pkg/crypto/tls/#Certificate.Leaf"><code>Certificate.Leaf</code></a>
field is set.
field is set. The
<a href="/pkg/crypto/tls/#Config.NameToCertificate"><code>Config.NameToCertificate</code></a>
field, which only supports associating a single certificate with
a give name, is now deprecated and should be left as <code>nil</code>.
Similarly the
<a href="/pkg/crypto/tls/#Config.BuildNameToCertificate"><code>Config.BuildNameToCertificate</code></a>
method, which builds the <code>NameToCertificate</code> field
from the leaf certificates, is now deprecated and should not be
called.
</p>

<p><!-- CL 175517 -->
Expand Down
Loading

0 comments on commit f837f90

Please sign in to comment.