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



Re: How should sparse depend on gcc?

2018-10-08 Thread Uwe Kleine-König
Hello,

On 09/21/2018 04:33 PM, Uwe Kleine-König wrote:
> sparse is a C code checker that reuses include files from gcc. Currently
> there are missing the needed dependencies
> (https://bugs.debian.org/906472).
> 
> Now I wonder, what is the right way to depend on gcc. For sparse it
> would be enough to depend on libgcc-8-dev (I think), but as cgcc (which
> is included in the sparse package) calls gcc, too, I need a dependency
> on the gcc package directly (which via gcc-8 depends on libgcc-8-dev).
> 
> As gcc-7 doesn't provide the needed paths, gcc 4:7.whatever isn't enough
> though.
> 
> I can imagine the following options to depend on:
> 
>   a) gcc, libgcc-8-dev
>   b) gcc (>= 4:8~), gcc (<< 4:9)
> 
> . Both have the disadvantage that they need manual adaption when gcc
> bumps it's major version.
> 
> a) also has the disadvantage that gcc might provide gcc-9 and so sparse
> uses different includes than the default compiler (not sure this is bad
> enough to care).
> 
> b) is bad, because gcc_4:9~prerelease12 would be good enough to make
> dpkg happy, but sparse would fail anyhow.
> 
> Alternatively sparse could stop hardcoding the include path and ask gcc
> on each invokation. But I don't like that much as the path hardly ever
> changes and it adds some overhead to sparse.
> 
> Do you have any thoughts/recommendations?

FTR: I changed cgcc to call gcc-8 (instead of cc) now and added a
dependency on gcc-8 now. This way it should be given that the include
files don't disappear and the called programs are around.

Best regards
Uwe



signature.asc
Description: OpenPGP digital signature


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