Re: libgo patch committed: Update to Go1.14beta1

2020-02-04 Thread Andrew Pinski
Something like attached.
I will clean it up next week and submit it then.
It should also fix some arm64be related issues too.

Thanks,
Andrew Pinski

On Mon, Feb 3, 2020 at 6:17 PM Ian Lance Taylor  wrote:
>
> On Sun, Feb 2, 2020 at 2:27 AM Andreas Schwab  wrote:
> >
> > I'm getting these errors on aarch64 with -mabi=ilp32:
> >
> > ../../../../libgo/go/runtime/mpagealloc.go:226:38: error: shift count 
> > overflow
> >   226 |  chunks [1 << pallocChunksL1Bits]*[1 << 
> > pallocChunksL2Bits]pallocData
> >   |  ^
> > ../../../../libgo/go/runtime/mgcscavenge.go:487:15: error: shift count 
> > overflow
> >   487 |l2 := (*[1 << 
> > pallocChunksL2Bits]pallocData)(atomic.Loadp(unsafe.Pointer([i.l1()])))
> >   |   ^
> > ../../../../libgo/go/runtime/mpagealloc.go:138:22: error: shift count 
> > overflow
> >   138 |   return uint(i) & (1< >   |  ^
> > ../../../../libgo/go/runtime/mpagealloc.go:129:21: error: integer constant 
> > overflow
> >   129 |   return uint(i) >> pallocChunksL1Shift
> >   | ^
> > ../../../../libgo/go/runtime/mpagealloc_64bit.go:34:2: error: integer 
> > constant overflow
> >34 |  summaryL0Bits,
> >   |  ^
>
> I'm not sure that gccgo ever fully worked with aarch64 -mabi=ilp32.
> In Go I think that will have to be represented with a new GOARCH
> value, arm64p32.
>
> Ian
From 14de07bd862051df38160da375fd286ce956785f Mon Sep 17 00:00:00 2001
From: Andrew Pinski 
Date: Wed, 5 Feb 2020 04:36:13 +
Subject: [PATCH] Add ilp32 ARM64 support to gccgo.

Change-Id: Ide52be45dd9fd5d2a5dfc7d138fc56d963d06632
Signed-off-by: Andrew Pinski 
---
 gcc/testsuite/go.test/go-test.exp |  9 ++-
 libgo/configure   | 27 ++-
 libgo/configure.ac| 20 +-
 libgo/go/cmd/cgo/main.go  |  6 +
 libgo/go/cmd/go/go_test.go|  1 +
 libgo/go/cmd/go/internal/imports/build.go |  2 ++
 libgo/go/cmd/internal/sys/arch.go | 10 +++
 libgo/go/cmd/internal/sys/supported.go| 10 ---
 libgo/go/crypto/aes/aes_gcm.go|  2 +-
 libgo/go/crypto/aes/cipher_asm.go |  2 +-
 libgo/go/crypto/aes/cipher_generic.go |  2 +-
 libgo/go/golang.org/x/sys/cpu/byteorder.go|  2 ++
 ...cpu_linux_arm64.go => cpu_linux_arm64x.go} |  2 ++
 .../golang.org/x/sys/cpu/cpu_linux_other.go   |  2 +-
 .../cpu/{cpu_arm64.go => cpu_arm64x.go}   |  2 ++
 libgo/go/internal/cpu/cpu_no_init.go  |  3 +++
 .../syscall/unix/getrandom_linux_generic.go   |  2 +-
 libgo/go/runtime/cputicks.go  |  3 +++
 libgo/go/runtime/hash32.go|  2 +-
 libgo/go/runtime/lfstack_32bit.go |  2 +-
 libgo/go/runtime/mpagealloc_32bit.go  |  2 +-
 .../{os_linux_arm64.go => os_linux_arm64x.go} |  2 +-
 libgo/go/runtime/os_linux_noauxv.go   |  2 +-
 libgo/go/syscall/endian_big.go|  2 +-
 libgo/go/syscall/endian_little.go |  2 +-
 libgo/goarch.sh   |  7 -
 libgo/match.sh|  4 +--
 libgo/testsuite/gotest|  4 +--
 28 files changed, 103 insertions(+), 33 deletions(-)
 rename libgo/go/golang.org/x/sys/cpu/{cpu_linux_arm64.go => 
cpu_linux_arm64x.go} (97%)
 rename libgo/go/internal/cpu/{cpu_arm64.go => cpu_arm64x.go} (98%)
 rename libgo/go/runtime/{os_linux_arm64.go => os_linux_arm64x.go} (94%)

diff --git a/gcc/testsuite/go.test/go-test.exp 
b/gcc/testsuite/go.test/go-test.exp
index 51f9b381d67..7afcba14b64 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -188,7 +188,14 @@ proc go-set-goarch { } {
 
 switch -glob $target_triplet {
"aarch64*-*-*" {
-   set goarch "arm64"
+   if [check_effective_target_lp64] {
+   set goarch "arm64"
+   } else {
+   set goarch "amd64p32"
+   }
+   if [check_effective_target_aarch64_big_endian] {
+   append goarch "be"
+   }
}
"alpha*-*-*" {
set goarch "alpha"
diff --git a/libgo/configure b/libgo/configure
index 2f787392abd..8eca900889f 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14070,7 +14070,7 @@ esac
 #   - libgo/go/syscall/endian_XX.go
 #   - possibly others
 # - possibly update files in libgo/go/internal/syscall/unix
-ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips 
mipsle mips64 mips64le mips64p32 mips64p32le nios2 ppc ppc64 ppc64le riscv 
riscv64 s390 s390x sh shbe sparc sparc64 wasm"
+ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be arm64p32 
arm64p32be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 
ppc ppc64 ppc64le riscv riscv64 s390 s390x sh shbe sparc sparc64 wasm"
 
 # All known GOARCH family values.
 ALLGOARCHFAMILY="I386 

Re: libgo patch committed: Update to Go1.14beta1

2020-02-03 Thread Ian Lance Taylor
On Sun, Feb 2, 2020 at 2:27 AM Andreas Schwab  wrote:
>
> I'm getting these errors on aarch64 with -mabi=ilp32:
>
> ../../../../libgo/go/runtime/mpagealloc.go:226:38: error: shift count overflow
>   226 |  chunks [1 << pallocChunksL1Bits]*[1 << pallocChunksL2Bits]pallocData
>   |  ^
> ../../../../libgo/go/runtime/mgcscavenge.go:487:15: error: shift count 
> overflow
>   487 |l2 := (*[1 << 
> pallocChunksL2Bits]pallocData)(atomic.Loadp(unsafe.Pointer([i.l1()])))
>   |   ^
> ../../../../libgo/go/runtime/mpagealloc.go:138:22: error: shift count overflow
>   138 |   return uint(i) & (1<   |  ^
> ../../../../libgo/go/runtime/mpagealloc.go:129:21: error: integer constant 
> overflow
>   129 |   return uint(i) >> pallocChunksL1Shift
>   | ^
> ../../../../libgo/go/runtime/mpagealloc_64bit.go:34:2: error: integer 
> constant overflow
>34 |  summaryL0Bits,
>   |  ^

I'm not sure that gccgo ever fully worked with aarch64 -mabi=ilp32.
In Go I think that will have to be represented with a new GOARCH
value, arm64p32.

Ian


Re: libgo patch committed: Update to Go1.14beta1

2020-02-03 Thread Ian Lance Taylor
On Sat, Feb 1, 2020 at 5:38 AM Andreas Schwab  wrote:
>
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:7:14: error: imported and 
> not used: unsafe
> 7 | import "unsafe"
>   |  ^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:13:1: error: redefinition 
> of 'SetLen'
>13 | func (iov *Iovec) SetLen(length int) {
>   | ^
> ../../../libgo/go/syscall/socket.go:437:1: note: previous definition of 
> 'SetLen' was here
>   437 | func (iov *Iovec) SetLen(length int) {
>   | ^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:17:1: error: redefinition 
> of 'SetControllen'
>17 | func (msghdr *Msghdr) SetControllen(length int) {
>   | ^
> ../../../libgo/go/syscall/socket.go:441:1: note: previous definition of 
> 'SetControllen' was here
>   441 | func (msghdr *Msghdr) SetControllen(length int) {
>   | ^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:21:1: error: redefinition 
> of 'SetLen'
>21 | func (cmsg *Cmsghdr) SetLen(length int) {
>   | ^
> ../../../libgo/go/syscall/socket.go:445:1: note: previous definition of 
> 'SetLen' was here
>   445 | func (cmsg *Cmsghdr) SetLen(length int) {
>   | ^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:14:10: error: incompatible 
> types in assignment (cannot use type uint64 as type Iovec_len_t)
>14 |  iov.Len = uint64(length)
>   |  ^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:18:20: error: incompatible 
> types in assignment (cannot use type uint64 as type Msghdr_controllen_t)
>18 |  msghdr.Controllen = uint64(length)
>   |^
> ../../../libgo/go/syscall/syscall_linux_riscv64.go:22:11: error: incompatible 
> types in assignment (cannot use type uint64 as type Cmsghdr_len_t)
>22 |  cmsg.Len = uint64(length)
>   |   ^


Thanks.  Fixed like so.  Committed to mainline.

Ian
79530f94e9c53153c4fae3b50a8c938f89db0c32
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 40529518b26..27f4ce342e5 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-d796680b5a78f686ed118578e81d5b1adf48508d
+c94637ad6fd38d4814fb02d094a1a73f19323d71
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/syscall/syscall_linux_riscv64.go 
b/libgo/go/syscall/syscall_linux_riscv64.go
index e9aab94e3a1..16d8709708d 100644
--- a/libgo/go/syscall/syscall_linux_riscv64.go
+++ b/libgo/go/syscall/syscall_linux_riscv64.go
@@ -4,20 +4,6 @@
 
 package syscall
 
-import "unsafe"
-
 func (r *PtraceRegs) PC() uint64 { return r.Pc }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
-
-func (iov *Iovec) SetLen(length int) {
-   iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-   msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-   cmsg.Len = uint64(length)
-}


Re: libgo patch committed: Update to Go1.14beta1

2020-02-03 Thread David Abdurachmanov
On Sat, Feb 1, 2020 at 2:38 PM Andreas Schwab  wrote:

> ../../../libgo/go/syscall/syscall_linux_riscv64.go:7:14: error: imported
> and not used: unsafe
> 7 | import "unsafe"
>   |  ^


I see the same issue in Fedora/RISCV, the last two builds of GCC 10 failed
due to it.

Btw, 1.14 Beta 2 should ship riscv64 support (marked as experimental).
See: https://go-review.googlesource.com/c/go/+/216757/

david


Re: libgo patch committed: Update to Go1.14beta1

2020-02-02 Thread Andreas Schwab
I'm getting these errors on aarch64 with -mabi=ilp32:

../../../../libgo/go/runtime/mpagealloc.go:226:38: error: shift count overflow
  226 |  chunks [1 << pallocChunksL1Bits]*[1 << pallocChunksL2Bits]pallocData
  |  ^
../../../../libgo/go/runtime/mgcscavenge.go:487:15: error: shift count overflow
  487 |l2 := (*[1 << 
pallocChunksL2Bits]pallocData)(atomic.Loadp(unsafe.Pointer([i.l1()])))
  |   ^
../../../../libgo/go/runtime/mpagealloc.go:138:22: error: shift count overflow
  138 |   return uint(i) & (1<> pallocChunksL1Shift
  | ^
../../../../libgo/go/runtime/mpagealloc_64bit.go:34:2: error: integer constant 
overflow
   34 |  summaryL0Bits,
  |  ^

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: libgo patch committed: Update to Go1.14beta1

2020-02-01 Thread Andreas Schwab
../../../libgo/go/syscall/syscall_linux_riscv64.go:7:14: error: imported and 
not used: unsafe
7 | import "unsafe"
  |  ^
../../../libgo/go/syscall/syscall_linux_riscv64.go:13:1: error: redefinition of 
'SetLen'
   13 | func (iov *Iovec) SetLen(length int) {
  | ^
../../../libgo/go/syscall/socket.go:437:1: note: previous definition of 
'SetLen' was here
  437 | func (iov *Iovec) SetLen(length int) {
  | ^
../../../libgo/go/syscall/syscall_linux_riscv64.go:17:1: error: redefinition of 
'SetControllen'
   17 | func (msghdr *Msghdr) SetControllen(length int) {
  | ^
../../../libgo/go/syscall/socket.go:441:1: note: previous definition of 
'SetControllen' was here
  441 | func (msghdr *Msghdr) SetControllen(length int) {
  | ^
../../../libgo/go/syscall/syscall_linux_riscv64.go:21:1: error: redefinition of 
'SetLen'
   21 | func (cmsg *Cmsghdr) SetLen(length int) {
  | ^
../../../libgo/go/syscall/socket.go:445:1: note: previous definition of 
'SetLen' was here
  445 | func (cmsg *Cmsghdr) SetLen(length int) {
  | ^
../../../libgo/go/syscall/syscall_linux_riscv64.go:14:10: error: incompatible 
types in assignment (cannot use type uint64 as type Iovec_len_t)
   14 |  iov.Len = uint64(length)
  |  ^
../../../libgo/go/syscall/syscall_linux_riscv64.go:18:20: error: incompatible 
types in assignment (cannot use type uint64 as type Msghdr_controllen_t)
   18 |  msghdr.Controllen = uint64(length)
  |^
../../../libgo/go/syscall/syscall_linux_riscv64.go:22:11: error: incompatible 
types in assignment (cannot use type uint64 as type Cmsghdr_len_t)
   22 |  cmsg.Len = uint64(length)
  |   ^

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: libgo patch committed: Update to Go1.14beta1

2020-01-23 Thread Ian Lance Taylor
On Thu, Jan 23, 2020 at 11:32 AM Maciej W. Rozycki  wrote:
>
> On Tue, 21 Jan 2020, Ian Lance Taylor wrote:
>
> > I've committed a patch to update libgo to Go 1.14beta1.  As usual with
> > these updates the patch is far too large to include in this e-mail
> > message.  I've included the diffs for gccgo-specific files.
>
>  It seems to have broken the `riscv64-linux-gnu' target:
>
> cpugen.go:2:7: error: redefinition of 'CacheLinePadSize'
> 2 | const CacheLinePadSize = 64
>   |   ^
> .../libgo/go/internal/cpu/cpu_riscv64.go:7:7: note: previous definition of 
> 'CacheLinePadSize' was here
> 7 | const CacheLinePadSize = 32
>   |   ^
> make[4]: *** [Makefile:2830: internal/cpu.lo] Error 1
> make[4]: Leaving directory '.../riscv64-linux-gnu/libgo'

Thanks.  Fixed like so.  Committed to mainline.

Ian
b83c78fe8fd12ce6c14fe2ca234edbbdac22cd79
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a8ba3afe86e..fc1dbaca8b9 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-7d3081ce69dda123d77e35e8b9d282e40e9465e2
+10a8dbfc9945c672d59af8edb9790e2019cdeb27
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/internal/cpu/cpu_riscv64.go 
b/libgo/go/internal/cpu/cpu_riscv64.go
index c49cab79fdc..d920fcf7a6d 100644
--- a/libgo/go/internal/cpu/cpu_riscv64.go
+++ b/libgo/go/internal/cpu/cpu_riscv64.go
@@ -3,5 +3,3 @@
 // license that can be found in the LICENSE file.
 
 package cpu
-
-const CacheLinePadSize = 32


Re: libgo patch committed: Update to Go1.14beta1

2020-01-23 Thread Rainer Orth
Hi Ian,

> On Wed, Jan 22, 2020 at 12:18 PM Rainer Orth
>  wrote:
>>
>> > I've committed a patch to update libgo to Go 1.14beta1.  As usual with
>> > these updates the patch is far too large to include in this e-mail
>> > message.  I've included the diffs for gccgo-specific files.
>> > Bootstrapped and ran Go tests on x86_64-pc-linux-gnu.  Committed to
>> > mainline.
>>
>> the patch broke Solaris bootstrap:
>>
>> /vol/gcc/src/hg/master/local/libgo/go/runtime/os_only_solaris.go:11:1:
>> error: redefinition of 'getncpu'
>>11 | func getncpu() int32 {
>>   | ^
>> /vol/gcc/src/hg/master/local/libgo/go/runtime/os3_solaris.go:20:1: note:
>> previous definition of 'getncpu' was here
>>20 | func getncpu() int32 {
>>   | ^
>>
>> There are 3 definitions in the Solaris/Illumos space:
>>
>> * os_only_solaris.go is guarded by !illumos
>>
>> * os3_solaris.go has no explicit guard
>>
>> * illumos hat its own one in os_illumos.go
>>
>> so the os3_solaris.go one can go.
>>
>> /vol/gcc/src/hg/master/local/libgo/go/runtime/stubs2.go:40:3: error:
>> osinit is not defined
>>40 | //go:linkname osinit runtime.osinit
>>   |   ^
>>
>> Upstream has a definition in os3_solaris.go.
>>
>> The following patch allows compilation to succeed.
>
> Thanks, I already committed a patch before I got to your e-mail.
> Sorry for the duplicate work.

no worries: it didn't take long to devise the fix.

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: libgo patch committed: Update to Go1.14beta1

2020-01-23 Thread Maciej W. Rozycki
On Tue, 21 Jan 2020, Ian Lance Taylor wrote:

> I've committed a patch to update libgo to Go 1.14beta1.  As usual with
> these updates the patch is far too large to include in this e-mail
> message.  I've included the diffs for gccgo-specific files.

 It seems to have broken the `riscv64-linux-gnu' target:

cpugen.go:2:7: error: redefinition of 'CacheLinePadSize'
2 | const CacheLinePadSize = 64
  |   ^
.../libgo/go/internal/cpu/cpu_riscv64.go:7:7: note: previous definition of 
'CacheLinePadSize' was here
7 | const CacheLinePadSize = 32
  |   ^
make[4]: *** [Makefile:2830: internal/cpu.lo] Error 1
make[4]: Leaving directory '.../riscv64-linux-gnu/libgo'

  Maciej


Re: libgo patch committed: Update to Go1.14beta1

2020-01-22 Thread Ian Lance Taylor
On Wed, Jan 22, 2020 at 12:18 PM Rainer Orth
 wrote:
>
> > I've committed a patch to update libgo to Go 1.14beta1.  As usual with
> > these updates the patch is far too large to include in this e-mail
> > message.  I've included the diffs for gccgo-specific files.
> > Bootstrapped and ran Go tests on x86_64-pc-linux-gnu.  Committed to
> > mainline.
>
> the patch broke Solaris bootstrap:
>
> /vol/gcc/src/hg/master/local/libgo/go/runtime/os_only_solaris.go:11:1: error: 
> redefinition of 'getncpu'
>11 | func getncpu() int32 {
>   | ^
> /vol/gcc/src/hg/master/local/libgo/go/runtime/os3_solaris.go:20:1: note: 
> previous definition of 'getncpu' was here
>20 | func getncpu() int32 {
>   | ^
>
> There are 3 definitions in the Solaris/Illumos space:
>
> * os_only_solaris.go is guarded by !illumos
>
> * os3_solaris.go has no explicit guard
>
> * illumos hat its own one in os_illumos.go
>
> so the os3_solaris.go one can go.
>
> /vol/gcc/src/hg/master/local/libgo/go/runtime/stubs2.go:40:3: error: osinit 
> is not defined
>40 | //go:linkname osinit runtime.osinit
>   |   ^
>
> Upstream has a definition in os3_solaris.go.
>
> The following patch allows compilation to succeed.

Thanks, I already committed a patch before I got to your e-mail.
Sorry for the duplicate work.

Ian


Re: libgo patch committed: Update to Go1.14beta1

2020-01-22 Thread Rainer Orth
Hi Ian,

> I've committed a patch to update libgo to Go 1.14beta1.  As usual with
> these updates the patch is far too large to include in this e-mail
> message.  I've included the diffs for gccgo-specific files.
> Bootstrapped and ran Go tests on x86_64-pc-linux-gnu.  Committed to
> mainline.

the patch broke Solaris bootstrap:

/vol/gcc/src/hg/master/local/libgo/go/runtime/os_only_solaris.go:11:1: error: 
redefinition of 'getncpu'
   11 | func getncpu() int32 {
  | ^
/vol/gcc/src/hg/master/local/libgo/go/runtime/os3_solaris.go:20:1: note: 
previous definition of 'getncpu' was here
   20 | func getncpu() int32 {
  | ^

There are 3 definitions in the Solaris/Illumos space:

* os_only_solaris.go is guarded by !illumos

* os3_solaris.go has no explicit guard

* illumos hat its own one in os_illumos.go

so the os3_solaris.go one can go.

/vol/gcc/src/hg/master/local/libgo/go/runtime/stubs2.go:40:3: error: osinit is 
not defined
   40 | //go:linkname osinit runtime.osinit
  |   ^

Upstream has a definition in os3_solaris.go.

The following patch allows compilation to succeed.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


diff --git a/libgo/go/runtime/os3_solaris.go b/libgo/go/runtime/os3_solaris.go
--- a/libgo/go/runtime/os3_solaris.go
+++ b/libgo/go/runtime/os3_solaris.go
@@ -17,12 +17,11 @@ func getPageSize() int32
 //extern sysconf
 func sysconf(int32) _C_long
 
-func getncpu() int32 {
-	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
-	if n < 1 {
-		return 1
+func osinit() {
+	ncpu = getncpu()
+	if physPageSize == 0 {
+		physPageSize = uintptr(getPageSize())
 	}
-	return n
 }
 
 func sysargs(argc int32, argv **byte) {


libgo patch committed: Update to Go1.14beta1

2020-01-21 Thread Ian Lance Taylor
I've committed a patch to update libgo to Go 1.14beta1.  As usual with
these updates the patch is far too large to include in this e-mail
message.  I've included the diffs for gccgo-specific files.
Bootstrapped and ran Go tests on x86_64-pc-linux-gnu.  Committed to
mainline.

Ian

gotools/ChangeLog:

2020-01-21  Ian Lance Taylor  

* Makefile.am (gofmt$(EXEEXT)): Link against $(LIBGOTOOL).
(check-go-tool): Copy some vendor directories.
* Makefile.in: Regenerate.
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a6127013783..dff5fb5bc70 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-a69ad9c7d1b45edcf8062a07d3a3c9b6838c04f8
+c2225a76d1e15f28056596807ebbbc526d4c58da
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 4b2dd58d40a..56d38f57e7d 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -262,7 +262,8 @@ toolexeclibgohash_DATA = \
hash/adler32.gox \
hash/crc32.gox \
hash/crc64.gox \
-   hash/fnv.gox
+   hash/fnv.gox \
+   hash/maphash.gox
 
 toolexeclibgohtmldir = $(toolexeclibgodir)/html
 
@@ -402,6 +403,7 @@ toolexeclibgounicode_DATA = \
 noinst_DATA = \
golang.org/x/net/nettest.gox \
internal/cfg.gox \
+   internal/obscuretestdata.gox \
internal/testenv.gox \
internal/trace.gox \
net/internal/socktest.gox \
diff --git a/libgo/configure.ac b/libgo/configure.ac
index d4ee59ca685..07c03bcdf26 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -10,7 +10,7 @@ AC_INIT(package-unused, version-unused,, libgo)
 AC_CONFIG_SRCDIR(Makefile.am)
 AC_CONFIG_HEADER(config.h)
 
-libtool_VERSION=15:0:0
+libtool_VERSION=16:0:0
 AC_SUBST(libtool_VERSION)
 
 AM_ENABLE_MULTILIB(, ..)
diff --git a/libgo/VERSION b/libgo/VERSION
index e0f726521a4..da5318592de 100644
--- a/libgo/VERSION
+++ b/libgo/VERSION
@@ -1 +1 @@
-go1.13
+go1.14beta1
diff --git a/libgo/check-packages.txt b/libgo/check-packages.txt
index 156a2bd4593..48c4dfdbc91 100644
--- a/libgo/check-packages.txt
+++ b/libgo/check-packages.txt
@@ -3,7 +3,6 @@ archive/zip
 bufio
 bytes
 cmd/go/internal/cache
-cmd/go/internal/dirhash
 cmd/go/internal/generate
 cmd/go/internal/get
 cmd/go/internal/imports
@@ -13,13 +12,10 @@ cmd/go/internal/lockedfile/internal/filelock
 cmd/go/internal/modconv
 cmd/go/internal/modfetch
 cmd/go/internal/modfetch/codehost
-cmd/go/internal/modfile
 cmd/go/internal/modload
-cmd/go/internal/module
 cmd/go/internal/mvs
 cmd/go/internal/par
 cmd/go/internal/search
-cmd/go/internal/semver
 cmd/go/internal/txtar
 cmd/go/internal/work
 cmd/internal/buildid
@@ -96,6 +92,7 @@ hash/adler32
 hash/crc32
 hash/crc64
 hash/fnv
+hash/maphash
 html
 html/template
 image
@@ -163,6 +160,8 @@ strings
 sync
 sync/atomic
 syscall
+testing
+testing/iotest
 testing/quick
 text/scanner
 text/tabwriter
diff --git a/libgo/gotool-packages.txt b/libgo/gotool-packages.txt
index b5a3bbda3b8..90521ae0b50 100644
--- a/libgo/gotool-packages.txt
+++ b/libgo/gotool-packages.txt
@@ -5,7 +5,6 @@ cmd/go/internal/cache
 cmd/go/internal/cfg
 cmd/go/internal/clean
 cmd/go/internal/cmdflag
-cmd/go/internal/dirhash
 cmd/go/internal/doc
 cmd/go/internal/envcmd
 cmd/go/internal/fix
@@ -22,23 +21,17 @@ cmd/go/internal/modcmd
 cmd/go/internal/modconv
 cmd/go/internal/modfetch
 cmd/go/internal/modfetch/codehost
-cmd/go/internal/modfile
 cmd/go/internal/modget
 cmd/go/internal/modinfo
 cmd/go/internal/modload
-cmd/go/internal/module
 cmd/go/internal/mvs
-cmd/go/internal/note
 cmd/go/internal/par
 cmd/go/internal/renameio
 cmd/go/internal/robustio
 cmd/go/internal/run
 cmd/go/internal/search
-cmd/go/internal/semver
 cmd/go/internal/str
-cmd/go/internal/sumweb
 cmd/go/internal/test
-cmd/go/internal/tlog
 cmd/go/internal/tool
 cmd/go/internal/txtar
 cmd/go/internal/version
@@ -47,10 +40,22 @@ cmd/go/internal/web
 cmd/go/internal/work
 cmd/internal/browser
 cmd/internal/buildid
+cmd/internal/diff
 cmd/internal/edit
 cmd/internal/objabi
 cmd/internal/sys
 cmd/internal/test2json
+golang.org/x/crypto/ed25519
+golang.org/x/crypto/ed25519/internal/edwards25519
+golang.org/x/mod/internal/lazyregexp
+golang.org/x/mod/modfile
+golang.org/x/mod/module
+golang.org/x/mod/semver
+golang.org/x/mod/sumdb
+golang.org/x/mod/sumdb/dirhash
+golang.org/x/mod/sumdb/note
+golang.org/x/mod/sumdb/tlog
+golang.org/x/mod/zip
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/internal/analysisflags
 golang.org/x/tools/go/analysis/internal/facts
@@ -86,3 +91,5 @@ golang.org/x/tools/go/ast/inspector
 golang.org/x/tools/go/cfg
 golang.org/x/tools/go/types/objectpath
 golang.org/x/tools/go/types/typeutil
+golang.org/x/xerrors
+golang.org/x/xerrors/internal
diff --git a/libgo/libgo-packages.txt b/libgo/libgo-packages.txt
index b19747a05b9..2b5fba806c6 100644
--- a/libgo/libgo-packages.txt
+++ b/libgo/libgo-packages.txt
@@ -72,12 +72,12 @@