Bug#904289: libgo build failure with GCC trunk 20181004

2018-10-08 Thread Ian Lance Taylor
On Mon, Oct 8, 2018 at 8:59 PM, Matthias Klose  wrote:
> On 08.10.2018 11:47, Svante Signell wrote:
>> On Fri, 2018-10-05 at 21:10 +0200, Svante Signell wrote:
>>> On Fri, 2018-10-05 at 01:38 +0200, Matthias Klose wrote:
 Hi Svante,

 please have a look at the recent libgo build failure with GCC trunk
 20181004 after the libgo merge.  Please could you update the
 patches and send them upstream again?
>>>
>>> Well I don't really know where to submit the patches to upstream, but
>>> here they are. Cc:ing the gcc-snapshot bug 904...@bugs.debian.org
>>> too.
>>
>> Hi again,
>>
>> Seems like more changes were needed this time: Attached are three
>> updated patches:
>> src_libgo_go_syscall.diff
>> add-gnu-to-libgo-headers.diff
>> add-gnu-to-libgo-test-headers.diff
>
> Thanks for the update, but please could you send *all* the patches to
> gcc-patc...@gcc.gnu.org, and maybe CC Ian?  Patches really have to be ready to
> be applied upstream, and not to some Debian package.
>
> Please see https://gcc.gnu.org/contribute.html how to contribute.  libgo might
> be a bit different, because the source is maintained in golang, and then
> imported into GCC.

The absolute best way to contribute to the libgo and gcc/go/gofrontend
directories is to use Gerrit, following the process described at
https://golang.org/doc/contribute.html.

But sending patches to gcc-patc...@gcc.gnu.org and CC'ing me is also
OK.  Yes, in general the patches have to apply to GCC trunk.

Thanks.

Ian



Bug#904289: libgo build failure with GCC trunk 20181004

2018-10-08 Thread Matthias Klose
On 08.10.2018 11:47, Svante Signell wrote:
> On Fri, 2018-10-05 at 21:10 +0200, Svante Signell wrote:
>> On Fri, 2018-10-05 at 01:38 +0200, Matthias Klose wrote:
>>> Hi Svante,
>>>
>>> please have a look at the recent libgo build failure with GCC trunk
>>> 20181004 after the libgo merge.  Please could you update the
>>> patches and send them upstream again?
>>
>> Well I don't really know where to submit the patches to upstream, but
>> here they are. Cc:ing the gcc-snapshot bug 904...@bugs.debian.org
>> too.
> 
> Hi again,
> 
> Seems like more changes were needed this time: Attached are three
> updated patches:
> src_libgo_go_syscall.diff
> add-gnu-to-libgo-headers.diff
> add-gnu-to-libgo-test-headers.diff

Thanks for the update, but please could you send *all* the patches to
gcc-patc...@gcc.gnu.org, and maybe CC Ian?  Patches really have to be ready to
be applied upstream, and not to some Debian package.

Please see https://gcc.gnu.org/contribute.html how to contribute.  libgo might
be a bit different, because the source is maintained in golang, and then
imported into GCC.

Matthias



Bug#904289: libgo build failure with GCC trunk 20181004

2018-10-08 Thread Svante Signell
On Fri, 2018-10-05 at 21:10 +0200, Svante Signell wrote:
> On Fri, 2018-10-05 at 01:38 +0200, Matthias Klose wrote:
> > Hi Svante,
> > 
> > please have a look at the recent libgo build failure with GCC trunk
> > 20181004 after the libgo merge.  Please could you update the
> > patches and send them upstream again?
> 
> Well I don't really know where to submit the patches to upstream, but
> here they are. Cc:ing the gcc-snapshot bug 904...@bugs.debian.org
> too.

Hi again,

Seems like more changes were needed this time: Attached are three
updated patches:
src_libgo_go_syscall.diff
add-gnu-to-libgo-headers.diff
add-gnu-to-libgo-test-headers.diff

Thanks!Index: gcc-snapshot-20181004/src/libgo/go/cmd/go/internal/base/signal_unix.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/cmd/go/internal/base/signal_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/cmd/go/internal/base/signal_unix.go
@@ -1,8 +1,9 @@
+
 // Copyright 2012 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js linux nacl netbsd openbsd solaris
 
 package base
 
Index: gcc-snapshot-20181004/src/libgo/go/crypto/x509/root_unix.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/crypto/x509/root_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/crypto/x509/root_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
 
 package x509
 
Index: gcc-snapshot-20181004/src/libgo/go/net/interface_stub.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/net/interface_stub.go
+++ gcc-snapshot-20181004/src/libgo/go/net/interface_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix nacl js,wasm
+// +build aix nacl gnu js,wasm
 
 package net
 
Index: gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/switch_unix.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/net/internal/socktest/switch_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/switch_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
 
 package socktest
 
Index: gcc-snapshot-20181004/src/libgo/go/net/port_unix.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/net/port_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/port_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris nacl
+// +build aix darwin dragonfly freebsd gnu js,wasm linux netbsd openbsd solaris nacl
 
 // Read system port mappings from /etc/services
 
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_largefile.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_largefile.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_largefile.go
@@ -5,7 +5,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix linux solaris,386 solaris,sparc
+// +build aix gnu linux solaris,386 solaris,sparc
 
 package os
 
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_regfile.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_regfile.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_regfile.go
@@ -6,6 +6,7 @@
 // license that can be found in the LICENSE file.
 
 // +build !aix
+// +build !gnu
 // +build !linux
 // +build !solaris !386
 // +build !solaris !sparc
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_unix.go
===
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
 
 package