Bug#1033007: Now gcc-13: [Fwd: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd.]

2023-03-15 Thread Svante Signell
Package: gcc-snapshot
Version: 1:20230315-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
Affects: gcc-snapshot
X-Debbugs-CC: debian-h...@lists.debian.org

Hello, seems like the patch gcc_config_gnu.h.diff, in debian gcc-12 named:
pr104290-followup.diff was lost (again).

How can this patch ever become upstreamed??

It seems like sending to gcc-patches is not enough. Create a regression bug?  
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290 is already reported as a
regression, it has to be updated to cover upstream releases of gcc-13 now.

For gcc-12 Debian has been carrying it as:
pr104290-followup.diff

Submitting this problem as new bug to Debian/gcc-13/gcc-snapshot!

Thanks!
--- Begin Message ---
Hello,

In line of porting the latest build of libgo/go with gcc-12 to GNU/Hurd, support
of split-stack was found to be removed.
 
After patching the files in libgo the build of gotools fails:
go1: error: '-fsplit-stack' currently only supported on GNU/Linux
go1: error: '-fsplit-stack' is not supported by this compiler configuration

The attached patch defines OPTION_GLIBC_P(opts) and OPTION_GLIBC that was lost
in config/gnu.h, needed to enable split-stack support for GNU/Hurd. 

This problem happened with the latest commit as discussed in the mail thread
starting with https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588973.html
.

The file first doing this check is: (first error: ..)
src/gcc/common/config/i386/i386-common.cc
in function:
static bool ix86_supports_split_stack (bool report,
struct gcc_options *opts ATTRIBUTE_UNUSED)

and secondly in:src/gcc/opts.cc: (second error: ...)
in function:
void
finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
location_t loc)

The checking logic is in function ix86_supports_split_stack():
#if defined(TARGET_THREAD_SPLIT_STACK_OFFSET) && defined(OPTION_GLIBC_P)
  if (!OPTION_GLIBC_P (opts))
#endif
{
  if (report)
error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
  return false;
}

  bool ret = true;

In case of GNU/Hurd TARGET_THREAD_SPLIT_STACK_OFFSET is defined as well as
OPTION_GLIBC_P but OPTION_GLIBC_P(opts) is needed to. The attached patch to
src/gcc/config/gnu.h creates that definition. For GNU/Hurd, gnu.h is included in
the configure stage:
Configuring stage 1 in ./gcc
...
Using the following target machine macro files:
...
../../src/gcc/config/gnu.h

For a longer history about this bug see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290

Additionally, I would propose the text in gcc/common/config/i386/i386-common.cc
to change from:
error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
to:
error ("%<-fsplit-stack%> currently only supported on GLIBC-based systems");

Thanks!

--- a/src/gcc/config/gnu.h	2022-02-06 11:59:41.0 +0100
+++ b/src/gcc/config/gnu.h	2022-02-06 12:00:19.0 +0100
@@ -19,6 +19,9 @@
 along with GCC.  If not, see .
 */
 
+#define OPTION_GLIBC_P(opts)	(DEFAULT_LIBC == LIBC_GLIBC)
+#define OPTION_GLIBC		OPTION_GLIBC_P (&global_options)
+
 #undef GNU_USER_TARGET_OS_CPP_BUILTINS
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()		\
 do {	\
--- End Message ---


Bug#1029050: gcc-snapshot: FTBFS on hurd-i386 (and other archs?)

2023-01-16 Thread Svante Signell
Source: gcc-snapshot
Version: 20230108-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hi,

gcc-snapshot in sid FTBFS on hurd-i386 due to that some patches are not
applied when building gcc-snapshot. After the statement in rules.patch
ifeq ($(single_package),yes)
  debian_patches =
endif
previously defined patches are cleared, causing the build failure, see
below.

debian/ files causing the problem:

debian/rules.defs:
ifneq (,$(findstring gcc-snapshot, $(PKGSOURCE)))
  single_package = yes
  trunk_build = yes

debian/rules.patch:
ifeq ($(single_package),yes)
  debian_patches =
endif

Thanks!



Bug#1027840: gcc-11: FTBFS on hurd-i386

2023-01-03 Thread Svante Signell
Source: gcc-11
Version: 11.3.0-10
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
Affects: gcc-11, gcc-snapshot
X-Debbugs-CC: debian-h...@lists.debian.org

Hi,

gcc-11-11.3.0-10 in sid FTBFS on hurd-i386 due to failing linkage of
pthread_once (same error already fixed in gcc-12 and gcc-13):
/<>/build/i686-gnu/libstdc++-v3/include/i686-gnu/bits/gthr-
default.h:700: undefined reference to `pthread_once'
and more.

The patch at hand is: libstdc++-hurd.diff, attached here for convenience.

Thanks!

This is notably needed because in glibc 2.34, the move of pthread functions
into libc.so happened for Linux only, not GNU/Hurd.

The pthread_self() function can also always be used fine as it is on
GNU/Hurd.

libstdc++-v3/ChangeLog:

* config/os/gnu-linux/os_defines.h [!__linux__]
  (_GLIBCXX_NATIVE_THREAD_ID, _GLIBCXX_GTHREAD_USE_WEAK): Do not define.

--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h
+++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h
@@ -49,22 +49,24 @@
 // version dynamically in case it has changed since libstdc++ was configured.
 #define _GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC __GLIBC_PREREQ(2,23)
 
-#if __GLIBC_PREREQ(2, 27)
-// Since glibc 2.27 pthread_self() is usable without linking to libpthread.
-# define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
-#else
+#ifdef __linux__
+# if __GLIBC_PREREQ(2, 27)
+// Since glibc 2.27 Linux' pthread_self() is usable without linking to libpthread.
+#  define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
+# else
 // Before then it was in libc.so.6 but not libc.a, and always returns 0,
 // which breaks the invariant this_thread::get_id() != thread::id{}.
 // So only use it if we know the libpthread version is available.
 // Otherwise use (__gthread_t)1 as the ID of the main (and only) thread.
-# define _GLIBCXX_NATIVE_THREAD_ID \
-  (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
-#endif
+#  define _GLIBCXX_NATIVE_THREAD_ID \
+   (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
+# endif
 
-#if __GLIBC_PREREQ(2, 34)
-// Since glibc 2.34 all pthreads functions are usable without linking to
+# if __GLIBC_PREREQ(2, 34)
+// Since glibc 2.34 all Linux pthreads functions are usable without linking to
 // libpthread.
-# define _GLIBCXX_GTHREAD_USE_WEAK 0
+#  define _GLIBCXX_GTHREAD_USE_WEAK 0
+# endif
 #endif
 
 #endif


Bug#1021357: gcc-12: FTBFS on hurd-i386

2022-10-06 Thread Svante Signell
Source: gcc-12
Version: 12_12.2.0-5
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
Affects: gcc-11, gcc-snapshot
X-Debbugs-CC: debian-h...@lists.debian.org

Hi,

gcc-12-12.2.0-4/5 in sid FTBFS on hurd-i386 due to failing linkage of
pthread_once (same error for gcc-11, gcc-12, gcc-snapshot):
/<>/build/i686-gnu/libstdc++-v3/include/i686-gnu/bits/gthr-
default.h:700: undefined reference to `pthread_once'

Patches have already submitted upstream by Samuel Thibault in August and
September, see
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600469.html
https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601754.html

Unfortunately upstream is not very responsive. Therefore I have taken the time
to send these patches to Debian in the mean time.

Patches extracted and attached from that mail message are:
1.diff-6.diff. Note that 1.diff does not apply to gcc-12, it is related to the
git repo. This is reflected in attached debian_rules.patch by commenting out
1.diff.

Just a reflection: Matthias you are really doing a great job with the
gcc releases: Kudos!

Thanks!

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ba5939d9003..dd288cce2ca 100644
--- a/src/libstdc++-v3/ChangeLog
+++ b/src/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2022-08-28  Samuel Thibault  
+
+   * config/os/gnu/os_defines.h: New file.
+   * config/os/gnu/ctype_base.h: New file.
+   * config/os/gnu/ctype_configure_char.cc: New file.
+   * config/os/gnu/ctype_inline.h: New file.
+   * configure.host: On gnu* host, use os/gnu instead of os/gnu-linux.
+
 2022-08-27  Patrick Palka  
diff --git a/src/libstdc++-v3/config/os/gnu/ctype_base.h b/src/libstdc++-v3/config/os/gnu/ctype_base.h
new file mode 100644
index 000..955146543db
--- /dev/null
+++ b/src/libstdc++-v3/config/os/gnu/ctype_base.h
@@ -0,0 +1,66 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-2022 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// .
+
+/** @file bits/ctype_base.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{locale}
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  /// @brief  Base class for ctype.
+  struct ctype_base
+  {
+// Non-standard typedefs.
+typedef const int* 		__to_type;
+
+// NB: Offsets into ctype::_M_table force a particular size
+// on the mask type. Because of this, we don't use an enum.
+typedef unsigned short 	mask;
+static const mask upper	= _ISupper;
+static const mask lower 	= _ISlower;
+static const mask alpha 	= _ISalpha;
+static const mask digit 	= _ISdigit;
+static const mask xdigit 	= _ISxdigit;
+static const mask space 	= _ISspace;
+static const mask print 	= _ISprint;
+static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
+static const mask cntrl 	= _IScntrl;
+static const mask punct 	= _ISpunct;
+static const mask alnum 	= _ISalpha | _ISdigit;
+#if __cplusplus >= 201103L
+static const mask blank	= _ISblank;
+#endif
+  };
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
diff --git a/src/libstdc++-v3/config/os/gnu/ctype_configure_char.cc b/src/libstdc++-v3/config/os/gnu/ctype_configure_char.cc
new file mode 100644
index 000..5a88fc11ab3
--- /dev/null
+++ b/src/libstdc++-v3/config/os/gnu/ctype_configure_char.cc
@@ -0,0 +1,196 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2011-2022 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITH

Bug#1005297: gcc-12-12-20220319-1: FTBFS on hurd-i386

2022-03-21 Thread Svante Signell
found 1005297 12-20220319-1
retitle 1005297 gcc-12-12-20220319-1: FTBFS on hurd-i386
thanks


Note: gcc-12-12-20220319-1 builds fine with pr104290-followup.diff and
Makefile.in.diff.

Matthias,

In Debian the patch gm2.diff is applied to the generated file
src/Makefile.in. Why not apply Makefile.in.diff too, to make gcc-12
build on GNU/Hurd until fixed upstream. Or maybe this is a Debian
problem?? See upstream bug 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104660

Thanks!



Bug#1005297: gcc-12-12-20220313-1: FTBFS on hurd-i386

2022-03-17 Thread Svante Signell
found 1005297 12-20220313-1
retitle 1005297 12-20220313-1: FTBFS on hurd-i386
thanks


Note: gcc-12-12-20220313-1 builds fine with pr104290-followup.diff and
Makefile.in.diff.

Mathias,

In Debian you apply the patch gm2.diff to src/Makefile.in. Why not apply
Makefile.in.diff too, to make gcc-12 build on GNU/Hurd until fixed upstream. Or
maybe this is a Debian problem?? See upstream bug 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104660

Thanks!



Bug#1005297: gcc-12-12-20220302-1: FTBFS on hurd-i386

2022-03-13 Thread Svante Signell
found 1005297 gcc-12-12-20220302-1
retitle 1005297 gcc-12-12-20220302-1: FTBFS on hurd-i386
tags 1005297 + patch
thanks

Hi again,

Unfortunately the Debian patch Makefile.in.diff is needed to for a
successful build. Attached again here for completeness, and should be
applied after gm2.diff.

For more information about this problem, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104660

In the reply from Richard Biener to this bug the writes:
https://gcc.gnu.org/pipermail/gcc-bugs/2022-February/778542.html

> Well, that's because of
> 
> dependencies = { module=all-target-libgo; on=all-target-libbacktrace;
> };
> dependencies = { module=all-target-libgo; on=all-target-libffi; };
> dependencies = { module=all-target-libgo; on=all-target-libatomic; };
> 
> the reason the dependency is conditional is that libgo is not
> bootstrapped (and so is libffi) but libbacktrace and libatomic are.

Thanks!

--- a/src/Makefile.in	2022-02-15 00:20:00.0 +0100
+++ b/src/Makefile.in	2022-02-15 00:25:27.0 +0100
@@ -66351,6 +66351,8 @@
 all-m4: maybe-all-build-texinfo
 configure-target-libgo: maybe-configure-target-libffi
 all-target-libgo: maybe-all-target-libffi
+all-target-libgo: maybe-all-target-libbacktrace
+all-target-libgo: maybe-all-target-libatomic
 configure-target-libphobos: maybe-configure-target-libbacktrace
 configure-stage1-target-libphobos: maybe-configure-stage1-target-libbacktrace
 configure-stage2-target-libphobos: maybe-configure-stage2-target-libbacktrace
@@ -66516,8 +66518,6 @@
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib
 configure-target-libgo: maybe-all-target-libstdc++-v3
-all-target-libgo: maybe-all-target-libbacktrace
-all-target-libgo: maybe-all-target-libatomic
 configure-target-libgm2: maybe-all-target-libstdc++-v3
 all-target-libgm2: maybe-all-target-libatomic
 configure-target-liboffloadmic: maybe-configure-target-libgomp


Bug#1005297: gcc-12-12-20220222: FTBFS on hurd-i386. Was: gcc-12-12-20220214: FTBFS on hurd-i386

2022-02-22 Thread Svante Signell
retitle 1005297 gcc-12-12-20220222: FTBFS on hurd-i386
thanks

On Fri, 2022-02-18 at 10:18 +, Debian Bug Tracking System wrote:
> Thank you for the additional information you have supplied regarding
> this Bug report.

Hello,

Unfortunately the patch Makefile.in.diff is needed to for a successful build.
Attached here for completeness.

Thanks!
--- a/src/Makefile.in	2022-02-15 00:20:00.0 +0100
+++ b/src/Makefile.in	2022-02-15 00:25:27.0 +0100
@@ -66351,6 +66351,8 @@
 all-m4: maybe-all-build-texinfo
 configure-target-libgo: maybe-configure-target-libffi
 all-target-libgo: maybe-all-target-libffi
+all-target-libgo: maybe-all-target-libbacktrace
+all-target-libgo: maybe-all-target-libatomic
 configure-target-libphobos: maybe-configure-target-libbacktrace
 configure-stage1-target-libphobos: maybe-configure-stage1-target-libbacktrace
 configure-stage2-target-libphobos: maybe-configure-stage2-target-libbacktrace
@@ -66516,8 +66518,6 @@
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib
 configure-target-libgo: maybe-all-target-libstdc++-v3
-all-target-libgo: maybe-all-target-libbacktrace
-all-target-libgo: maybe-all-target-libatomic
 configure-target-libgm2: maybe-all-target-libstdc++-v3
 all-target-libgm2: maybe-all-target-libatomic
 configure-target-liboffloadmic: maybe-configure-target-libgomp


Bug#1005297: gcc-12-12-20220214: FTBFS on hurd-i386; Was: gcc-12-12-20220206: FTBFS on hurd-i386

2022-02-18 Thread Svante Signell
retitle 1005297 gcc-12-12-29229214: FTBFS on hurd-i386
thanks

On Thu, 2022-02-10 at 19:34 +0100, Svante Signell wrote:
> Source: gcc-12
> Version: 12_12-20220206-1
> Severity: important
> Tags: patch
> User: debian-h...@lists.debian.org
> Usertags: hurd

Hi again,

Attached are patches to successfully build gcc-12-12-20220214-1 from source:

debian_rules.patch.patch: Adds hurd-specific patches to to debian/rules.patch.
gcc_config_gnu.h.diff: Re-enables split-stack support.

The patches below are needed for a successful build of libgo.so.21.0.0:
libgo_go_net_unixsock_readmsg_cloexec.go.diff
libgo_go_runtime_netpoll_hurd.go.diff
libgo_go_runtime_os_hurd.go.diff
libgo_go_syscall_exec_bsd.go.diff
libgo_go_syscall_exec_hurd.go.diff
libgo_go_os_user_cgo_listgroups_unix.go.diff
libgo_go_os_user_getgrouplist_unix.go.diff
libgo_go_internal_testenv_testenv_unix.go.diff
libgo_go_os_exec_internal_fdtest_exists_unix.go.diff

Makefile.in.diff: This patch is modified from the upstream patch
src_Makefile.in.diff since the Debian-specific patch gm2.diff makes changes to
src/Makefile.in before Makefile.in.diff is applied.

All patches have been submitted upstream in 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290

The patch, libgo_go_net_unixsock_readmsg_cloexec.go.diff, has already been
committed upstream by Ian.

Thanks!
--- a/debian/rules.patch	2022-02-15 23:07:04.0 +0100
+++ b/debian/rules.patch	2022-02-15 23:14:51.0 +0100
@@ -192,6 +192,17 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += gcc_config_gnu.h
+  debian_patches += libgo_go_net_unixsock_readmsg_cloexec.go
+  debian_patches += libgo_go_runtime_netpoll_hurd.go
+  debian_patches += libgo_go_runtime_os_hurd.go
+  debian_patches += libgo_go_syscall_exec_bsd.go
+  debian_patches += libgo_go_syscall_exec_hurd.go
+  debian_patches += libgo_go_os_user_cgo_listgroups_unix.go
+  debian_patches += libgo_go_os_user_getgrouplist_unix.go
+  debian_patches += libgo_go_internal_testenv_testenv_unix.go
+  debian_patches += libgo_go_os_exec_internal_fdtest_exists_unix.go
+  debian-patches += Makefile.in
 endif
 
 debian_patches += gcc-ice-dump
--- a/src/gcc/config/gnu.h	2022-02-06 11:59:41.0 +0100
+++ b/src/gcc/config/gnu.h	2022-02-06 12:00:19.0 +0100
@@ -19,6 +19,9 @@
 along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define OPTION_GLIBC_P(opts)	(DEFAULT_LIBC == LIBC_GLIBC)
+#define OPTION_GLIBC		OPTION_GLIBC_P (&global_options)
+
 #undef GNU_USER_TARGET_OS_CPP_BUILTINS
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()		\
 do {	\
--- a/src/libgo/go/internal/testenv/testenv_unix.go	2022-02-14 03:23:21.0 +0100
+++ b/src/libgo/go/internal/testenv/testenv_unix.go	2022-02-15 13:06:16.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
 
 package testenv
 
--- a/src/libgo/go/net/unixsock_readmsg_cloexec.go	2022-02-15 00:27:45.0 +0100
+++ b/src/libgo/go/net/unixsock_readmsg_cloexec.go	2022-02-15 00:29:01.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || freebsd || solaris
+//go:build aix || darwin || freebsd || hurd || solaris
 
 package net
 
--- a/src/libgo/go/os/exec/internal/fdtest/exists_unix.go	2022-02-14 03:23:21.0 +0100
+++ b/src/libgo/go/os/exec/internal/fdtest/exists_unix.go	2022-02-15 13:38:42.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
 
 // Package fdtest provides test helpers for working with file descriptors across exec.
 package fdtest
--- a/src/libgo/go/os/user/cgo_listgroups_unix.go	2022-02-14 03:23:22.0 +0100
+++ b/src/libgo/go/os/user/cgo_listgroups_unix.go	2022-02-15 12:13:35.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (dragonfly || darwin || freebsd || (!android && linux) || netbsd || openbsd || (solaris && !illumos)) && cgo && !osusergo
+//go:build (dragonfly || darwin || freebsd || hurd || (!android && linux) || netbsd || openbsd || (solaris && !illumos)) && cgo && !osusergo
 
 package user
 
--- a/src/libgo/go/os/user/getgrouplist_unix.go	2022-02-14 03:23:22.0 +0100
+++ b/src/libgo/go/os/user/getgrouplist_unix.go	2022-02-15 12:17:12.0 +0100
@@

Bug#1005297: gcc-12-12-20220206: FTBFS on hurd-i386

2022-02-10 Thread Svante Signell
Source: gcc-12
Version: 12_12-20220206-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

gcc-12-12-20220206 in experimental FTBFS on hurd-i386 due to missing
patches for gccgo, gnu.h and an yet unresolved bug in src/Makefile.in.
Attached are patches needed for a successful build.

This bug has been reported by Mathias and assigned upstream, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290
but no patches are yet committed.

debian_rules.patch.patch patches debian/rules.patch to include the two
patches: gcc_config_gnu.h.diff fixing the split-stack problem when
building gotools and libgo_go_net_unixsock_readmsg_cloexec.go.diff
fixing the build of libgo. The last patch src_Makefile.in.patch, is for
src/Makefile.in moving 
all-target-libgo: maybe-all-target-libbacktrace
all-target-libgo: maybe-all-target-libatomic
outside of the
@unless gcc-bootstrap
@endunless gcc-bootstrap
pair. This patch is not part of the debian_rules.patch since I'm unsure
if this a patch is needed for all architectures or GNU/Hurd only.

BTW: Creating a new src/Makefile.in by
(cd src; autogen Makefile.def) does still create a buggy Makefile.in.
The reason of why some dependencies are within the @unless/@endunless
pair is still unknown. configure{,.ac} has the following note:

# Do not nest @if/@endif or @unless/@endunless pairs, because
# configure will not warn you at all.

Googling around did not help much, I've found no documentation of it's
use and how to encounter it.

Just a reflection: Matthias you are really doing a great job with the
gcc releases: Kudos!

Thanks!

--- a/debian/rules.patch	2022-01-26 11:49:06.0 +0100
+++ b/debian/rules.patch	2022-02-02 13:08:44.0 +0100
@@ -192,6 +192,8 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += gcc_config_gnu.h
+  debian_patches += libgo_go_net_unixsock_readmsg_cloexec.go
 endif
 
 debian_patches += gcc-ice-dump
--- a/src/gcc/config/gnu.h	2022-02-06 11:59:41.0 +0100
+++ b/src/gcc/config/gnu.h	2022-02-06 12:00:19.0 +0100
@@ -19,6 +19,9 @@
 along with GCC.  If not, see .
 */
 
+#define OPTION_GLIBC_P(opts)	(DEFAULT_LIBC == LIBC_GLIBC)
+#define OPTION_GLIBC		OPTION_GLIBC_P (&global_options)
+
 #undef GNU_USER_TARGET_OS_CPP_BUILTINS
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()		\
 do {	\
--- a/src/libgo/go/net/unixsock_readmsg_cloexec.go	2021-08-25 14:06:31.0 +0200
+++ b/src/libgo/go/net/unixsock_readmsg_cloexec.go	2022-02-01 16:10:01.0 +0100
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 //go:build aix || darwin || freebsd || solaris
-// +build aix darwin freebsd solaris
+// +build aix darwin freebsd hurd solaris
 
 package net
 
--- a/src/Makefile.in	2022-02-08 23:25:36.0 +0100
+++ b/src/Makefile.in	2022-02-09 12:37:13.0 +0100
@@ -67372,6 +67372,8 @@
 all-m4: maybe-all-build-texinfo
 configure-target-libgo: maybe-configure-target-libffi
 all-target-libgo: maybe-all-target-libffi
+all-target-libgo: maybe-all-target-libbacktrace
+all-target-libgo: maybe-all-target-libatomic
 configure-target-libphobos: maybe-configure-target-libbacktrace
 configure-stage1-target-libphobos: maybe-configure-stage1-target-libbacktrace
 configure-stage2-target-libphobos: maybe-configure-stage2-target-libbacktrace
@@ -67541,8 +67543,6 @@
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib
 configure-target-libgo: maybe-all-target-libstdc++-v3
-all-target-libgo: maybe-all-target-libbacktrace
-all-target-libgo: maybe-all-target-libatomic
 configure-target-libgm2: maybe-all-target-libstdc++-v3
 all-target-libgm2: maybe-all-target-libatomic
 configure-target-liboffloadmic: maybe-configure-target-libgomp


Re: Bug#970614: gcc-10: Please disable systemtap-sdt-dev build-dep on non-Linux

2020-09-19 Thread Svante Signell
On Sat, 2020-09-19 at 22:05 +0200, Samuel Thibault wrote:
> Package: gcc-10
> Version: 10.2.0-7
> Severity: important
> Tags: patch
> 
> Hello,
> 
> systemtap is a Linux thing, and doesn't currently build on non-Linux
> ports, could you disable the dependency as the attached patch does?

Hi Samuel,

Have you seen #969968? Maybe you can NMU that package, or build it for -ports
until upstream or the Debian maintainer has reacted.

The systemtap-sdt-dev package affects more than gcc-10, e.g. gcc-8 and gcc-9.

Thanks!



Bug#956820: gccgo does not implement syscall in hurd-i386

2020-04-17 Thread Svante Signell
Hi Praveen,

Which packages in Debian GNU/Hurd did you install to build golang-
github-nsf-termbox-go? I can maybe try out the build to find out where
it fials.

Thanks!

On Wed, 2020-04-15 at 22:34 +0530, Pirate Praveen wrote:
> Package: gccgo-9
> Version: 9.3.0-9
> Severity: important
> X-debbugs-cc: debian-h...@lists.debian.org
> 
> golang-github-nsf-termbox-go is failing to build with gcc-go
> (changed 
> Build-Depends to golang-any and built on hurd-i386 latest sid).
> 
> There are many failures like this,
> 
> src/github.com/nsf/termbox-go/termbox.go:507:37: error: reference to 
> undefined identifier ‘syscall.SYS_FCNTL’ 507 | r, _, e := 
> syscall.Syscall(syscall.SYS_FCNTL, uintptr(fd), uintptr(cmd),
>  | ^
> src/github.com/nsf/termbox-go/termbox.go:50:17: error: use of
> undefined 
> type ‘syscall_Termios’
>   50 | orig_tios syscall_Termios
> 
> $ go version
> go version go1.12.2 gccgo (Debian 9.3.0-9) 9.3.0 hurd/386
> 
> Discussion with hurd maintainers 
> https://lists.debian.org/debian-hurd/2020/04/msg00026.html
> 
> Full build log attached. I think gccgo needs to implement these
> syscall 
> interfaces for hurd.
> 
> 



Bug#950188: gcc-snapshot: FTBFS on hurd-i386

2020-02-01 Thread Svante Signell
reassign 950188 gcc-10-10-20200129
thanks!

> 
> The patches have now been committed upstream by Ian.
> 
> > They don't apply to gcc-10 in experimental. Close this issue?
> 
> They might not apply to gcc-10, but they apply fine to 1:20200124-1.
> I'm still confused why you have both gcc-10 and gcc-snapshot? 

They do apply to 10_10-20200129-1 as well as 1:20200124-1. I'm
attaching them now for completeness, but they should not be needed
anymore. The upstream bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93468
was closed by Ian on January 30.
I have now test-built gcc-10 as well as gcc-snapshot with successful
outcome.

> > > Or is gcc-10 release upstream already (I don't think so)?
> > they are the same, there's some overlap.  it's easier to provide
> > current trunk in just a single package during development.

Thanks!
--- a/src/libgo/go/runtime/nbpipe_pipe2.go	2020-01-23 21:11:38.0 +0100
+++ b/src/libgo/go/runtime/nbpipe_pipe2.go	2020-01-27 17:31:31.0 +0100
@@ -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 freebsd linux netbsd openbsd solaris
+// +build freebsd hurd linux netbsd openbsd solaris
 
 package runtime
 
--- a/src/libgo/go/runtime/netpoll_hurd.go	2020-01-18 16:14:17.0 +0100
+++ b/src/libgo/go/runtime/netpoll_hurd.go	2020-01-27 16:23:00.0 +0100
@@ -85,6 +85,10 @@
 	return uintptr(rdwake<<16 | wrwake)
 }
 
+func netpollIsPollDescriptor(fd uintptr) bool {
+	return fd == uintptr(rdwake) || fd == uintptr(wrwake)
+}
+
 // netpollwakeup writes on wrwake to wakeup poll before any changes.
 func netpollwakeup() {
 	if pendingUpdates == 0 {
@@ -158,17 +162,32 @@
 	unlock(&mtxset)
 }
 
-// polls for ready network connections
-// returns list of goroutines that become runnable
+// netpollBreak interrupts an epollwait.
+func netpollBreak() {
+	netpollwakeup()
+}
+
+// netpoll checks for ready network connections.
+// Returns list of goroutines that become runnable.
+// delay < 0: blocks indefinitely
+// delay == 0: does not block, just polls
+// delay > 0: block for up to that many nanoseconds
 //go:nowritebarrierrec
-func netpoll(block bool) gList {
-	timeout := int32(0)
-	if !block {
-		timeout = 0
+func netpoll(delay int64) gList {
+	timeout:= int32(0)
+	if delay < 0 {
+		timeout = 0
+	} else if delay == 0 {
+		// TODO: call poll with timeout == 0
 		return gList{}
-	}
-	if pollVerbose {
-		println("*** netpoll", block)
+	} else if delay < 1e6 {
+		timeout = 1
+	} else if delay < 1e15 {
+		timeout = int32(delay / 1e6)
+	} else {
+		// An arbitrary cap on how long to wait for a timer.
+		// 1e9 ms == ~11.5 days.
+		timeout = 1e9
 	}
 retry:
 	lock(&mtxpoll)
@@ -176,40 +195,37 @@
 	pendingUpdates = 0
 	unlock(&mtxpoll)
 
-	if pollVerbose {
-		println("*** netpoll before poll")
-	}
-	n := libc_poll(&pfds[0], int32(len(pfds)), timeout)
-	if pollVerbose {
-		println("*** netpoll after poll", n)
-	}
+	n := libc_poll(&pfds[0], int32(len(pfds)), timeout)
 	if n < 0 {
 		e := errno()
 		if e != _EINTR {
 			println("errno=", e, " len(pfds)=", len(pfds))
 			throw("poll failed")
 		}
-		if pollVerbose {
-			println("*** poll failed")
-		}
 		unlock(&mtxset)
+		// If a timed sleep was interrupted, just return to
+		// recalculate how long we should sleep now.
+		if timeout > 0 {
+			return gList{}
+		}
 		goto retry
 	}
 	// Check if some descriptors need to be changed
 	if n != 0 && pfds[0].revents&(_POLLIN|_POLLHUP|_POLLERR) != 0 {
-		var b [1]byte
-		for read(rdwake, unsafe.Pointer(&b[0]), 1) == 1 {
-			if pollVerbose {
-println("*** read 1 byte from pipe")
+		if delay != 0 {
+			// A netpollwakeup could be picked up by a
+			// non-blocking poll. Only clear the wakeup
+			// if blocking.
+			var b [1]byte
+			for read(rdwake, unsafe.Pointer(&b[0]), 1) == 1 {
 			}
 		}
-		// Do not look at the other fds in this case as the mode may have changed
-		// XXX only additions of flags are made, so maybe it is ok
-		unlock(&mtxset)
-		goto retry
+		// Still look at the other fds even if the mode may have
+		// changed, as netpollBreak might have been called.
+		n--
 	}
 	var toRun gList
-	for i := 0; i < len(pfds) && n > 0; i++ {
+	for i := 1; i < len(pfds) && n > 0; i++ {
 		pfd := &pfds[i]
 
 		var mode int32
@@ -222,19 +238,14 @@
 			pfd.events &= ^_POLLOUT
 		}
 		if mode != 0 {
-			if pollVerbose {
-println("*** netpollready i=", i, "revents=", pfd.revents, "events=", pfd.events, "pd=", pds[i])
+			pds[i].everr = false
+			if pfd.revents == _POLLERR {
+pds[i].everr = true
 			}
 			netpollready(&toRun, pds[i], mode)
 			n--
 		}
 	}
 	unlock(&mtxset)
-	if block && toRun.empty() {
-		goto retry
-	}
-	if pollVerbose {
-		println("*** netpoll returning end")
-	}
 	return toRun
 }
--- a/src/libgo/go/syscall/sockcmsg_unix_other.go	2020-01-23 21:11:38.0 +0100
+++ b/src/libgo/go/syscall/sockcmsg_unix_other.go	2020-01-27 16:49:55.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source

Bug#950188: gcc-snapshot: FTBFS on hurd-i386

2020-01-30 Thread Svante Signell
On Thu, 2020-01-30 at 19:46 +0100, Matthias Klose wrote:
> On 1/29/20 10:35 PM, Svante Signell wrote:
> > Source: gcc-snapshot
> > Version: 1:20200124-1
> > Severity: important
> > Tags: patch
> > User: debian-h...@lists.debian.org
> > Usertags: hurd
> > 
> > Hi,
> > 
> > gcc-snapshot FTBFS on hurd-i386 due to missing patches for
> > gccgo. Attached are the three patches needed for a successful
> > build. This bug has been reported and assigned upstream, see
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93468
> > but not yet committed.

The patches have now been committed upstream by Ian.

> They don't apply to gcc-10 in experimental. Close this issue?

They might not apply to gcc-10, but they apply fine to 1:20200124-1.
I'm still confused why you have both gcc-10 and gcc-snapshot? 

> > One thing is confusing:
> > According to upstream you can report bugs against gcc-10, but not
> > upstream. However, in Debian you have both gcc-10-* in experimental
> > and gcc-snapshot in sid. Are these based on the same upstream
> > sources?
> > Or is gcc-10 release upstream already (I don't think so)?
> 
> they are the same, there's some overlap.  it's easier to provide
> current trunk in just a single package during development.

See above.

Thanks a lot for your maintaining gcc, et al!



Bug#950188: gcc-snapshot: FTBFS on hurd-i386

2020-01-29 Thread Svante Signell
Source: gcc-snapshot
Version: 1:20200124-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

gcc-snapshot FTBFS on hurd-i386 due to missing patches for
gccgo. Attached are the three patches needed for a successful build.
This bug has been reported and assigned upstream, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93468
but not yet committed.

One thing is confusing:
According to upstream you can report bugs against gcc-10, but not
upstream. However, in Debian you have both gcc-10-* in experimental and
gcc-snapshot in sid. Are these based on the same upstream sources? Or
is gcc-10 release upstream already (I don't think so)?

Attached are the patches created against gcc-snapshot-20200124, and
they will definitely apply also to gcc-10-10-20200129-1, if needed.

Just a reflection: Matthias you are really doing a great job with the
gcc releases (and other too): Cudos!

Thanks!
Index: gcc-snapshot-20180425/src/libgo/configure.ac
===
--- gcc-snapshot-20180425.orig/src/libgo/configure.ac
+++ gcc-snapshot-20180425/src/libgo/configure.ac
@@ -154,7 +154,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="aix android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -166,6 +166,7 @@ is_dragonfly=no
 is_rtems=no
 is_solaris=no
 is_aix=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -178,6 +179,7 @@ case ${host} in
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
   *-*-aix*)  is_aix=yes; GOOS=aix ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -189,6 +191,7 @@ AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
 AM_CONDITIONAL(LIBGO_IS_AIX, test $is_aix = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -798,6 +801,13 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   AC_DEFINE(SETCONTEXT_CLOBBERS_TLS, 1,
 	[Define if setcontext clobbers TLS variables])
Index: gcc-snapshot-20180425/src/libgo/Makefile.am
===
--- gcc-snapshot-20180425.orig/src/libgo/Makefile.am
+++ gcc-snapshot-20180425/src/libgo/Makefile.am
@@ -429,10 +429,14 @@ else
 if LIBGO_IS_AIX
 runtime_getncpu_file = runtime/getncpu-aix.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-snapshot-20180425/src/libgo/Makefile.in
===
--- gcc-snapshot-20180425.orig/src/libgo/Makefile.in
+++ gcc-snapshot-20180425/src/libgo/Makefile.in
@@ -186,7 +186,8 @@ am__DEPENDENCIES_4 = $(am__DEPENDENCIES_
 	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3)
 libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
 @LIBGO_IS_RTEMS_TRUE@am__objects_1 = rtems-task-variable-add.lo
-@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-gnu.lo
 @LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-aix.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
@@ -762,7 +763,8 @@ noinst_DATA = golang_org/x/net/internal/
 	zstdpkglist.go zdefaultcc.go
 @L

Bug#946709: Patch for one more successful libgo test: syscall

2019-12-23 Thread Svante Signell
Hello again,

The attached patch libgo_go_syscall_export_unix_test.go.diff fixes one failing
test of libgo: syscall. Maybe it could be added to the patch already submitted
patch in this bug report.

Thanks!
--- a/src/libgo/go/syscall/export_unix_test.go	2017-05-10 19:26:09.0 +0200
+++ b/src/libgo/go/syscall/export_unix_test.go	2019-12-23 00:34:36.0 +0100
@@ -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 linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
 
 package syscall
 


Bug#946709: gcc-9: Backported upstream gccgo patch for hurd-i386

2019-12-14 Thread Svante Signell
Package: gcc-9
Version: 9.2.1-1
Severity: important
Tags: patch

Hello,

gccgo patches for GNU/Hurd are now committed upstream for both gcc-9 and 
gcc-10. 
As found out by Samuel Thibault the current code in os_hurd.go use a relative
time instead of an absolute time, see 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92861

That bug is now fixed for gcc-10 upstream. However, for gcc-9 we need a patch to
fix also that problem. I've adapted the upstream commit to the attached file
gcc.git-fix-sem_timedwait.diff. A patch for debian/rules.patch is also attached.

Running the libgo testsuite for gcc-9-9.2.1-1 reveals that (almost) all timeout
failures are gone. The number of failing tests has decreased considerably:
(PASS/FAIL) = (158/26) -> (167/17).

Thanks!
--- a/src/libgo/go/runtime/os_hurd.go	2019-12-11 23:50:43.0 +0100
+++ b/src/libgo/go/runtime/os_hurd.go	2019-12-12 00:02:20.0 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// This file is derived from os_solaris.go.
+// This file is derived from os_aix.go.
 
 package runtime
 
@@ -31,6 +31,10 @@
 //extern sem_timedwait
 func sem_timedwait(sem *_sem_t, timeout *timespec) int32
 
+//go:noescape
+//extern clock_gettime
+func clock_gettime(clock_id int32, timeout *timespec) int32
+
 //go:nosplit
 func semacreate(mp *m) {
 	if mp.mos.waitsema != 0 {
@@ -54,8 +58,23 @@
 	_m_ := getg().m
 	if ns >= 0 {
 		var ts timespec
-		ts.set_sec(ns / 10)
-		ts.set_nsec(int32(ns % 10))
+
+		if clock_gettime(_CLOCK_REALTIME, &ts) != 0 {
+			throw("clock_gettime")
+		}
+
+		sec := int64(ts.tv_sec) + ns/1e9
+		nsec := int64(ts.tv_nsec) + ns%1e9
+		if nsec >= 1e9 {
+			sec++
+			nsec -= 1e9
+		}
+		if sec != int64(timespec_sec_t(sec)) {
+		// Handle overflows (timespec_sec_t is 32-bit in 32-bit applications)
+		sec = 1<<31 - 1
+		}
+		ts.tv_sec = timespec_sec_t(sec)
+		ts.tv_nsec = timespec_nsec_t(nsec)
 
 		if sem_timedwait((*_sem_t)(unsafe.Pointer(_m_.mos.waitsema)), &ts) != 0 {
 			err := errno()
--- a/debian/rules.patch	2019-11-25 15:31:24.0 +0100
+++ b/debian/rules.patch	2019-12-11 15:23:57.0 +0100
@@ -215,6 +215,7 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += gcc.git-fix-sem_timedwait
 endif
 
 debian_patches += gcc-ice-dump


PATCH: gccgo for GNU/Hurd: Was: Re: gcc-8_8.3.0-2_source.changes ACCEPTED into unstable

2019-02-26 Thread Svante Signell
On Tue, 2019-02-26 at 08:39 +, Debian FTP Masters wrote:
> 
> Accepted:
> 
> Format: 1.8
> Date: Tue, 26 Feb 2019 09:26:57 +0100
> Source: gcc-8
> Architecture: source
> Version: 8.3.0-2
> Distribution: unstable
> Urgency: medium
> Maintainer: Debian GCC Maintainers 
> Changed-By: Matthias Klose 
> Changes:
>  gcc-8 (8.3.0-2) unstable; urgency=medium
>  .
>* Fix the nvptx build.

Hi, now that go support for GNU/Hurd is available upstream with gcc-9 I
did have a look at the patches for gcc-8 (not being upstreamed yet).
Upgrading the patch, src_libgo_go_runtime.diff, specifically  files
netpoll_gnu.go and netpoll.go according to the patches for gcc-9 the
number of passing tests for libgo increases by five. I think it is
really worth upgrading the patch for gcc-8, even if these patches are
not becoming upstreamed! Especially since gcc-8 will be the default
compiler for Buster.

Before:
=== libgo Summary ===

# of expected passes139
# of unexpected failures24

After:

=== libgo Summary ===

# of expected passes144
# of unexpected failures19

Attached:  
Index: gcc-8-8.3.0/src/libgo/go/runtime/netpoll.go
===
--- gcc-8-8.3.0.orig/src/libgo/go/runtime/netpoll.go
+++ gcc-8-8.3.0/src/libgo/go/runtime/netpoll.go
@@ -170,7 +170,7 @@ func poll_runtime_pollWait(pd *pollDesc,
 		return err
 	}
 	// As for now only Solaris uses level-triggered IO.
-	if GOOS == "solaris" {
+	if GOOS == "solaris" || GOOS == "gnu" {
 		netpollarm(pd, mode)
 	}
 	for !netpollblock(pd, int32(mode), false) {
Index: gcc-8-8.3.0/src/libgo/go/runtime/netpoll_gnu.go
===
--- /dev/null
+++ gcc-8-8.3.0/src/libgo/go/runtime/netpoll_gnu.go
@@ -0,0 +1,241 @@
+// Copyright 2019 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.
+
+package runtime
+
+import "unsafe"
+
+// FIXME: Improve network poller for hurd.
+// This is based on the former libgo/runtime/netpoll_select.c implementation
+// except that it uses poll instead of select and is written in Go.
+// It's also based on Solaris implementation for the arming mechanisms
+// Inspiration was also taken from netpoll_aix.go and netpoll_solaris.go
+
+//From /usr/include/x86_64-linux-gnu/sys/poll.h
+//go:noescape
+//extern poll
+func libc_poll(pfds *pollfd, nfds int32, timeout int32) int32
+
+//go:noescape
+//extern pipe2
+func libc_pipe2(fd *int32, flags int32) int32
+
+//pollfd represents the poll structure for GNU/Hurd operating system.
+type pollfd struct {
+	fd  int32 // File descriptor to poll.
+	events  int16 // Types of events poller cares about.
+	revents int16 // Types of events that actually occurred.
+}
+
+//From /usr/include/i386-gnu/bits/poll.h
+const _POLLIN = 01// There is data to read.
+const _POLLPRI = 02   // There is urgent data to read.
+const _POLLOUT = 04   // Writing now will not block.
+const _POLLERR = 010  // Error condition.
+const _POLLHUP = 020  // Hung up.
+const _POLLNVAL = 040 // Invalid polling request.
+
+var (
+	pfds   []pollfd
+	pds[]*pollDesc
+	mtxpollmutex
+	mtxset mutex
+	rdwake int32
+	wrwake int32
+	pendingUpdates int32
+)
+
+const pollVerbose = false
+
+func netpollinit() {
+	var p [2]int32
+
+	// Create the pipe we use to wakeup poll.
+	if err := libc_pipe2(&p[0], _O_CLOEXEC|_O_NONBLOCK); err < 0 {
+		throw("runtime:netpollinit(): failed to create pipe2")
+	}
+	rdwake = p[0]
+	wrwake = p[1]
+
+	// Pre-allocate array of pollfd structures for poll.
+	if pollVerbose {
+		println("*** allocating")
+	}
+	pfds = make([]pollfd, 1, 128)
+	if pollVerbose {
+		println("*** allocating done", &pfds[0])
+	}
+
+	// Poll the read side of the pipe.
+	pfds[0].fd = int32(rdwake)
+	pfds[0].events = int16(_POLLIN)
+	pfds[0].revents = int16(0)
+
+	pds = make([]*pollDesc, 1, 128)
+	// Checks for pd != nil are made in netpoll.
+	pds[0] = nil
+}
+
+func netpolldescriptor() uintptr {
+	// Both fds must be returned.
+	if rdwake > 0x || wrwake > 0x {
+		throw("netpolldescriptor: invalid fd number")
+	}
+	return uintptr(rdwake<<16 | wrwake)
+}
+
+// netpollwakeup writes on wrwake to wakeup poll before any changes.
+func netpollwakeup() {
+	if pendingUpdates == 0 {
+		pendingUpdates = 1
+		if pollVerbose {
+			println("*** writing 1 byte")
+		}
+		b := [1]byte{0}
+		write(uintptr(wrwake), unsafe.Pointer(&b[0]), 1)
+	}
+}
+
+func netpollopen(fd uintptr, pd *pollDesc) int32 {
+	if pollVerbose {
+		println("*** netpollopen", fd)
+	}
+	lock(&mtxpoll)
+	netpollwakeup()
+
+	lock(&mtxset)
+	unlock(&mtxpoll)
+
+	pd.user = uint32(len(pfds))
+	pfds = append(pfds, pollfd{fd: int32(fd)})
+	pds = append(pds, pd)
+	unlock(&mtxset)
+	return 0
+}
+
+func netpollclose(fd uintptr) int32 {
+	if pollVerbose {
+		println("*** netpollclose", fd)
+	}
+

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

Bug#904289: gcc-snapshot: 20180822-1 FTBFS

2018-08-24 Thread Svante Signell
found 904289 20180822-1
tags 904289 ftbfs
thanks


Hi,

gcc-snapshot 20180822-1 FTBFS on hurd-i386 due to a few outdated
patches for gccgo. All 12 refreshed patches were attached to this bug
report for version 20180721-1. The same patches applies also for
version 20180822-1.

Version 20180822-1 built fine on a hurd-i386 test box.

Thanks!



Bug#905714: gcc-6: FTBFS on hurd-i386

2018-08-08 Thread Svante Signell
Source: gcc-6
Version: 6.4.0-19
Severity: important
Tags: ftbfs, patch
User: debian-h...@lists.debian.org
Usertags: hurd-i386

Hello,

Currently gcc-6 FTBFS on GNU/Hurd due to an isl-bug (#905708) and a
patch for libgo not applying properly. Attached is an updated version
of that patch. Some of the other patches apply with an offset, but are
not submitted here. In case you need a complete set of refreshed
patches, please let me know.

Thanks!Index: gcc-6-6.4.0-19.1/src/libgo/Makefile.in
===
--- gcc-6-6.4.0-19.1.orig/src/libgo/Makefile.in
+++ gcc-6-6.4.0-19.1/src/libgo/Makefile.in
@@ -230,11 +230,13 @@ libgo_llgo_la_DEPENDENCIES = $(am__DEPEN
 @LIBGO_IS_LINUX_TRUE@am__objects_4 = lock_futex.lo thread-linux.lo
 @HAVE_SYS_MMAN_H_FALSE@am__objects_5 = mem_posix_memalign.lo
 @HAVE_SYS_MMAN_H_TRUE@am__objects_5 = mem.lo
-@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_6 = netpoll_kqueue.lo
+@LIBGO_IS_GNU_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_6 = netpoll_kqueue.lo
+@LIBGO_IS_GNU_TRUE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_6 = netpoll_select.lo
 @LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@am__objects_6 = netpoll_select.lo
 @LIBGO_IS_LINUX_TRUE@am__objects_6 = netpoll_epoll.lo
 @LIBGO_IS_RTEMS_TRUE@am__objects_7 = rtems-task-variable-add.lo
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_8 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_8 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_8 = getncpu-gnu.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_8 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_8 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@am__objects_8 = getncpu-solaris.lo
@@ -359,6 +361,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -393,8 +396,10 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MATH_FLAG = @MATH_FLAG@
 MATH_LIBS = @MATH_LIBS@
 MKDIR_P = @MKDIR_P@
@@ -434,6 +439,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
@@ -822,14 +828,16 @@ toolexeclibgounicode_DATA = \
 @LIBGO_IS_RTEMS_TRUE@rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
 @LIBGO_IS_LINUX_FALSE@runtime_lock_files = runtime/lock_sema.c runtime/thread-sema.c
 @LIBGO_IS_LINUX_TRUE@runtime_lock_files = runtime/lock_futex.c runtime/thread-linux.c
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-gnu.c
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@runtime_getncpu_file = runtime/getncpu-solaris.c
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@runtime_getncpu_file = runtime/getncpu-irix.c
 @LIBGO_IS_DARWIN_TRUE@@LIBGO_IS_LINUX_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
 @LIBGO_IS_LINUX_TRUE@runtime_getncpu_file = runtime/getncpu-linux.c
-@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_netpoll_files = runtime/netpoll_kqueue.c
+@LIBGO_IS_GNU_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_netpoll_files = runtime/netpoll_kqueue.c
+@LIBGO_IS_GNU_TRUE@@LIBGO_IS_LINUX_FALSE@@LIBG

Bug#905708: gcc-6: FTBFS with isl 0.20

2018-08-08 Thread Svante Signell
Source: gcc-6
Version: 6.4.0-19
Severity: serious
Tags: ftbfs, patch

Hi,

gcc-6 FTBFs with the latest version of isl (0.20-1) as well as gcc-7
(see #905539).

Attached is a patch, isl-includes.diff fixing this problem. Attached is
also the diff for debian/rules.patch.

Thanks!--- a/debian_rules.patch.orig	2018-08-04 21:57:36.0 +0200
+++ b/debian/rules.patch	2018-08-05 00:37:20.433243847 +0200
@@ -385,6 +385,7 @@
 
 debian_patches += libgomp-kfreebsd-testsuite
 debian_patches += go-testsuite
+debian_patches += isl-includes
 
 # Ada patches needed for both the stable package and snapshot builds
 debian_patches += ada-749574
Index: gcc-6-6.4.0/src/gcc/graphite-dependences.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-dependences.c
+++ gcc-6-6.4.0/src/gcc/graphite-dependences.c
@@ -24,6 +24,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"
Index: gcc-6-6.4.0/src/gcc/graphite-isl-ast-to-gimple.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-isl-ast-to-gimple.c
+++ gcc-6-6.4.0/src/gcc/graphite-isl-ast-to-gimple.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #define INCLUDE_MAP
 #include "system.h"
Index: gcc-6-6.4.0/src/gcc/graphite-optimize-isl.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-optimize-isl.c
+++ gcc-6-6.4.0/src/gcc/graphite-optimize-isl.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"
Index: gcc-6-6.4.0/src/gcc/graphite-sese-to-poly.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-sese-to-poly.c
+++ gcc-6-6.4.0/src/gcc/graphite-sese-to-poly.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"


Re: Bug#905539: gcc-7 FTBFS with isl 0.20 + gcc-6

2018-08-08 Thread Svante Signell
tags 905539 patch
thanks

On Sun, 2018-08-05 at 21:37 +0200, Svante Signell wrote:
> On Sun, 2018-08-05 at 20:52 +0200, Helmut Grohne wrote:
> > Source: gcc-7
> > Version: 7.3.0-27
> > Severity: serious
> > Tags: ftbfs
> > User: helm...@debian.org
> > Usertags: rebootstrap
> > 
> > Hi Matthias,
> > 
> > I'm not sure whether you're aware already, but I felt that it was
> > best
> > to just document that gcc-7 fails to build against isl 0.20. I
> > tried to
> > check the vcs on whether this is already pending, but since alioth
> > is
> > offline finding the vcs is difficult. Maybe you could also update
> > the
> > Vcs fields. Build log symptom:
> > 
> > > ../../src/gcc/graphite-optimize-isl.c: In function
> > > 'isl_schedule_node*
> > > get_schedule_for_node_st(isl_schedule_node*, void*)':
> > > ../../src/gcc/graphite-optimize-isl.c:57:52: error:
> > > 'isl_space_dim' was not
> > > declared in this scope
> > >unsigned dims = isl_space_dim (space, isl_dim_set);
> 
> The same happens with gcc-6. I have created a patch that makes gcc-6
> building again, maybe it would suffice for gcc-7 too? However, that
> patch is on another computer, not reachable for me tonight. I can
> submit the patch in a bug report for gcc-6 tomorrow afternoon. OK?

Attached is the patch making both gcc-6 and gcc-7 build properly.
Attached is also the diff for debian/rules.patch. It applies OK on gcc-
6 and with an offset on gcc-7. For gcc-6 I'll file a separate bug with
these patches.--- a/debian_rules.patch.orig	2018-08-04 21:57:36.0 +0200
+++ b/debian/rules.patch	2018-08-05 00:37:20.433243847 +0200
@@ -385,6 +385,7 @@
 
 debian_patches += libgomp-kfreebsd-testsuite
 debian_patches += go-testsuite
+debian_patches += isl-includes
 
 # Ada patches needed for both the stable package and snapshot builds
 debian_patches += ada-749574
Index: gcc-6-6.4.0/src/gcc/graphite-dependences.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-dependences.c
+++ gcc-6-6.4.0/src/gcc/graphite-dependences.c
@@ -24,6 +24,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"
Index: gcc-6-6.4.0/src/gcc/graphite-isl-ast-to-gimple.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-isl-ast-to-gimple.c
+++ gcc-6-6.4.0/src/gcc/graphite-isl-ast-to-gimple.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #define INCLUDE_MAP
 #include "system.h"
Index: gcc-6-6.4.0/src/gcc/graphite-optimize-isl.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-optimize-isl.c
+++ gcc-6-6.4.0/src/gcc/graphite-optimize-isl.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"
Index: gcc-6-6.4.0/src/gcc/graphite-sese-to-poly.c
===
--- gcc-6-6.4.0.orig/src/gcc/graphite-sese-to-poly.c
+++ gcc-6-6.4.0/src/gcc/graphite-sese-to-poly.c
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.
 #include "config.h"
 
 #ifdef HAVE_isl
+#include 
+#include 
 
 #include "system.h"
 #include "coretypes.h"


Re: Bug#905539: gcc-7 FTBFS with isl 0.20 + gcc-6

2018-08-05 Thread Svante Signell
On Sun, 2018-08-05 at 20:52 +0200, Helmut Grohne wrote:
> Source: gcc-7
> Version: 7.3.0-27
> Severity: serious
> Tags: ftbfs
> User: helm...@debian.org
> Usertags: rebootstrap
> 
> Hi Matthias,
> 
> I'm not sure whether you're aware already, but I felt that it was best
> to just document that gcc-7 fails to build against isl 0.20. I tried to
> check the vcs on whether this is already pending, but since alioth is
> offline finding the vcs is difficult. Maybe you could also update the
> Vcs fields. Build log symptom:
> 
> > ../../src/gcc/graphite-optimize-isl.c: In function 'isl_schedule_node*
> > get_schedule_for_node_st(isl_schedule_node*, void*)':
> > ../../src/gcc/graphite-optimize-isl.c:57:52: error: 'isl_space_dim' was not
> > declared in this scope
> >    unsigned dims = isl_space_dim (space, isl_dim_set);

The same happens with gcc-6. I have created a patch that makes gcc-6 building
again, maybe it would suffice for gcc-7 too? However, that patch is on another
computer, not reachable for me tonight. I can submit the patch in a bug report
for gcc-6 tomorrow afternoon. OK?



Bug#897416: gcc: Decimal float support is not enabled on kfreebsd-amd64

2018-07-05 Thread Svante Signell
On Thu, 2018-07-05 at 12:37 +0200, Svante Signell wrote:
> On Tue, 2018-07-03 at 05:42 +0200, Matthias Klose wrote:
> > On 01.07.2018 00:02, Svante Signell wrote:
> > > reopen 897416
> > > found 897416 7.3.0-24, 8.1.0-9
> > > tags 897416 patch
> > > thanks
> > > 
> > > Hi, the patch by Matthias was not enough to make gcc-7,8 to build
> > > properly. Three configure files were needed to be recreated from
> > > their
> > > corresponding configure.ac. Additionally, this patch use x86_64*-
> > > *-
> > > gnu*
> > > to also cover the future implementation of 64bit Hurd.
> > 
> > this is not applied upstream. Please test the patch on trunk,
> > forward
> > it upstream and make sure it gets applied.
> 
> It is already forwarded upstream (somewhat differently) by James
> Clarke: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00218.html

Additional info: gcc-7-7.3.2-24 and gcc-8-8.1.0-9 built fine on
kfreebsd-amd64 with the patch in this bug report.



Bug#897416: gcc: Decimal float support is not enabled on kfreebsd-amd64

2018-07-05 Thread Svante Signell
On Tue, 2018-07-03 at 05:42 +0200, Matthias Klose wrote:
> On 01.07.2018 00:02, Svante Signell wrote:
> > reopen 897416
> > found 897416 7.3.0-24, 8.1.0-9
> > tags 897416 patch
> > thanks
> > 
> > Hi, the patch by Matthias was not enough to make gcc-7,8 to build
> > properly. Three configure files were needed to be recreated from
> > their
> > corresponding configure.ac. Additionally, this patch use x86_64*-*-
> > gnu*
> > to also cover the future implementation of 64bit Hurd.
> 
> this is not applied upstream. Please test the patch on trunk, forward
> it upstream and make sure it gets applied.

It is already forwarded upstream (somewhat differently) by James
Clarke: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00218.html



Bug#897416: gcc: Decimal float support is not enabled on kfreebsd-amd64

2018-06-30 Thread Svante Signell
reopen 897416
found 897416 7.3.0-24, 8.1.0-9
tags 897416 patch
thanks

Hi, the patch by Matthias was not enough to make gcc-7,8 to build
properly. Three configure files were needed to be recreated from their
corresponding configure.ac. Additionally, this patch use x86_64*-*-gnu* 
to also cover the future implementation of 64bit Hurd.

Thanks!# DP: Enable decimal float support on kfreebsd-amd64

--- a/src/gcc/configure.ac
+++ b/src/gcc/configure.ac
@@ -817,6 +817,7 @@ AC_ARG_ENABLE(__cxa_atexit,
 [], [])
 
 # Enable C extension for decimal float if target supports it.
+# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4
 GCC_AC_ENABLE_DECIMAL_FLOAT([$target])
 
 dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
--- a/src/libgcc/configure.ac
+++ b/src/libgcc/configure.ac
@@ -206,6 +206,7 @@ AC_CHECK_HEADERS(inttypes.h stdint.h std
 AC_HEADER_STDC
 
 # Check for decimal float support.
+# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4
 AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
 	   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include 
--- a/src/libdecnumber/configure.ac	2017-01-08 17:43:30.0 +0100
+++ b/src/libdecnumber/configure.ac	2018-06-30 18:41:50.117324000 +0200
@@ -77,6 +77,7 @@
 
 # Default decimal format
 # If you change the defaults here, be sure to change them in the GCC directory also
+# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4
 AC_MSG_CHECKING([for decimal floating point])
 
 GCC_AC_ENABLE_DECIMAL_FLOAT([$target])
--- a/src/config/dfp.m4
+++ b/src/config/dfp.m4
@@ -21,7 +21,7 @@ Valid choices are 'yes', 'bid', 'dpd', a
 [
   case $1 in
 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
-i?86*-*-elfiamcu | i?86*-*-gnu* | \
+i?86*-*-elfiamcu | i?86*-*-gnu* | x86_64*-*-gnu* | \
 i?86*-*-mingw* | x86_64*-*-mingw* | \
 i?86*-*-cygwin* | x86_64*-*-cygwin*)
   enable_decimal_float=yes


Bug#898901: gcc-6: FTBFS on hurd-i386

2018-05-17 Thread Svante Signell
Source: gcc-6
Version: 6.4.0-17
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

gcc-6 has been FTBFS since 6.4.0-12 on GNU/Hurd due to an outdated patch for
gccgo, caused by the upgrade of glibc from 2.25 to 2.26+

Attached is an updated patch: src_libgo_mksysinfo.sh.diff to enable gccgo to
build properly on gcc-6 again.

Running tests for libgo gives:

=== libgo Summary ===

# of expected passes119
# of unexpected failures15

Thanks!Index: gcc-6-6.4.0-17.1/src/libgo/mksysinfo.sh
===
--- gcc-6-6.4.0-17.1.orig/src/libgo/mksysinfo.sh
+++ gcc-6-6.4.0-17.1/src/libgo/mksysinfo.sh
@@ -301,8 +301,20 @@ grep -v '^// ' gen-sysinfo.go | \
 
 # The errno constants.  These get type Errno.
 echo '#include ' | ${CC} -x c - -E -dM | \
-  egrep '#define E[A-Z0-9_]+ ' | \
-  sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}
+  egrep '#define E[A-Z0-9_]+ [0-9]' | \
+sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}
+# Workaround for GNU/Hurd _EMIG_* errors having negative values
+echo '#include ' | ${CC} -x c - -E -dM | \
+  egrep '#define E[A-Z0-9_]+ -[0-9]' | \
+sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(-_\1)/' >> ${OUT}
+
+# Special treatment of EWOULDBLOCK for GNU/Hurd
+# /usr/include/bits/errno.h: #define EWOULDBLOCK EAGAIN
+if egrep '^const _EWOULDBLOCK = _EAGAIN' gen-sysinfo.go > /dev/null 2>&1; then
+  if egrep '^const EAGAIN = Errno\(_EAGAIN\)' ${OUT}; then
+  echo 'const EWOULDBLOCK = Errno(_EAGAIN)' >> ${OUT}
+  fi
+fi
 
 # The O_xxx flags.
 egrep '^const _(O|F|FD)_' gen-sysinfo.go | \
@@ -362,6 +374,11 @@ grep '^const _SYS_' gen-sysinfo.go | \
 echo "const $sup = _$sys" >> ${OUT}
   done
 
+# Special treatment of SYS_IOCTL for GNU/Hurd
+if ! grep '^const SYS_IOCTL' ${OUT} > /dev/null 2>&1; then
+  echo "const SYS_IOCTL = 0" >> ${OUT}
+fi
+
 # The GNU/Linux support wants to use SYS_GETDENTS64 if available.
 if ! grep '^const SYS_GETDENTS ' ${OUT} >/dev/null 2>&1; then
   echo "const SYS_GETDENTS = 0" >> ${OUT}
@@ -676,6 +693,11 @@ grep '^type _tms ' gen-sysinfo.go | \
 
 # The stat type.
 # Prefer largefile variant if available.
+# Special treatment of st_dev for GNU/Hurd
+# /usr/include/i386-gnu/bits/stat.h: #define st_dev st_fsid
+if grep 'define st_dev st_fsid' gen-sysinfo.go > /dev/null 2>&1; then
+  sed -i -e 's/; st_fsid/; st_dev/' gen-sysinfo.go
+fi
 stat=`grep '^type _stat64 ' gen-sysinfo.go || true`
 if test "$stat" != ""; then
   grep '^type _stat64 ' gen-sysinfo.go


Bug#897416: mpfr4: FTBFS on kfreebsd-amd64

2018-05-03 Thread Svante Signell
On Thu, 2018-05-03 at 14:59 +0100, James Clarke wrote:
> On 3 May 2018, at 09:21, Svante Signell 
> wrote:
> > On Wed, 2018-05-02 at 12:51 +0100, James Clarke wrote:
> > > Control: reassign -1 gcc-7
> > > Control: retitle -1 gcc: Decimal float support is not enabled on
> > > kfreebsd-
> > > amd64
> > > 
> > > On 2 May 2018, at 10:38, Svante Signell  > > > wrote:
> > > > 
> > > > Source: mpfr4
> > > > Version: 4.0.1-1
> > > > Severity: important
> > > > Tags: patch
> > > > User: debian-...@lists.debian.org
> > > > Usertags: kfreebsd

> > I think it is unfortunate that you reassigned this bug to gcc-7.
> > That will not
> > solve the mpfr4 build on the buildds.
> > 
> > There are two ways to solve this problem:
> > 1)
> > - reassign this bug back to mpfr4, adding the
> > libfr6.symbols.kfreebsd-amd64 in
> > next version 4.0.1-2.
> 
> Well, if you wanted to do that, it should be by changing the
> (arch=...) restriction lists in the main libfr6.symbols rather than
> forking a copy for kfreebsd-amd64.

Do you mean changing
(arch=any-amd64 any-i386 powerpc ppc64 ppc64el s390x)mpfr_get_decimal64
@Base 4.0.0
to
(arch=any-amd64 !kfreebsd-amd64 any-i386 powerpc ppc64 ppc64el s390x)mp
fr_get_decimal64@Base 4.0.0
if that works. Or list all arch-any architectures except kfreebsd-
amd64. How to find the architecture list for any-amd64?

The result would still be the same: as soon as gcc-7-7.3.0-18 is built
the libfr6.symbols file has to be changed again. Wouldn't it be better
to just remove the libfr6.symbols.kfreebsd-amd64 file for next version
of mpfr4 4.0.1-2?

> > - clone this bug to gcc-7, adding a patch to dfp.m4 so it can be
> > integrated in
> > next release of gcc-7: 7.3.0-18?
> 
> Personally I'd just get gcc patched and give back mpfr4.

How would you be able to build gcc-7 on the buildds with the current
mpfr4-4.0.1-1? It does not build as is on kfreebsd-amd64.



Bug#897416: mpfr4: FTBFS on kfreebsd-amd64

2018-05-03 Thread Svante Signell
On Wed, 2018-05-02 at 12:51 +0100, James Clarke wrote:
> Control: reassign -1 gcc-7
> Control: retitle -1 gcc: Decimal float support is not enabled on kfreebsd-
> amd64
> 
> On 2 May 2018, at 10:38, Svante Signell  wrote:
> > 
> > Source: mpfr4
> > Version: 4.0.1-1
> > Severity: important
> > Tags: patch
> > User: debian-...@lists.debian.org
> > Usertags: kfreebsd
> > 
> > Hi,
> > 
> > mpfr4 FTBFS on kFreebsd-amd64 due to mismatches in the
> > debian/libmpfr6.symbols
> > file. Attached is a file with the symbols generated from the build:
> > libmpfr6.symbols.kfreebsd-amd64.
> > 
> > Thanks!
> 
> You're right that the symbols file is currently wrong, but IMO gcc should have
> decimal float support enabled for kfreebsd-amd64. It's enabled for
> kfreebsd-i386 by virtue of the fact that i?86*-*-gnu* (for Hurd) matches
> kfreebsd-i386's tuple, but there's no corresponding x86_64*-*-gnu* for a
> future
> 64-bit Hurd, and thus kfreebsd-amd64's tuple is not matched[0].
> 
> James
> 
> [0] https://github.com/gcc-mirror/gcc/blob/trunk/config/dfp.m4#L23-L26

Hi James,

I think it is unfortunate that you reassigned this bug to gcc-7. That will not
solve the mpfr4 build on the buildds.

There are two ways to solve this problem:
1)
- reassign this bug back to mpfr4, adding the libfr6.symbols.kfreebsd-amd64 in
next version 4.0.1-2.
- clone this bug to gcc-7, adding a patch to dfp.m4 so it can be integrated in
next release of gcc-7: 7.3.0-18?

2) (not preferred)
- Build an NMUed version of mpfr4, 4.0.1-1.1, and install it at debian-ports. 

For GNU/Hurd the entry in sources.list is
deb http://ftp.ports.debian.org/debian-ports unreleased main

What about creating
http://ftp.ports.debian.org/debian-ports/pool-kfreebsd-{amd64,i386} and populate
 the mpfr4 packages there at pool-kfreebsd-amd64/m/. Additionally the buildds
need to use these packages. Unfortunately I don't know how to do that.

Then when gcc-7-7.3.0-18 is released, an updated version of mpfr4 is hopefully
available (if not, what to do, how to get back to using the old version?)



Bug#897416: mpfr4: FTBFS on kfreebsd-amd64

2018-05-02 Thread Svante Signell
Source: mpfr4
Version: 4.0.1-1
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

Hi,

mpfr4 FTBFS on kFreebsd-amd64 due to mismatches in the debian/libmpfr6.symbols
file. Attached is a file with the symbols generated from the build:
libmpfr6.symbols.kfreebsd-amd64.

Thanks!libmpfr.so.6 libmpfr6 #MINVER#
 __gmpfr_cache_const_catalan@Base 3.1.3
 __gmpfr_cache_const_euler@Base 3.1.3
 __gmpfr_cache_const_log2@Base 3.1.3
 __gmpfr_cache_const_pi@Base 3.1.3
 __gmpfr_ceil_exp2@Base 3.1.3
 __gmpfr_ceil_log2@Base 3.1.3
 __gmpfr_const_log2_RNDD@Base 4.0.0
 __gmpfr_const_log2_RNDU@Base 4.0.0
 __gmpfr_cuberoot@Base 3.1.3
 __gmpfr_default_fp_bit_precision@Base 3.1.3
 __gmpfr_default_rounding_mode@Base 3.1.3
 __gmpfr_emax@Base 3.1.3
 __gmpfr_emin@Base 3.1.3
 __gmpfr_flags@Base 3.1.3
 __gmpfr_floor_log2@Base 3.1.3
 __gmpfr_four@Base 3.1.3
 __gmpfr_fpif_export@Base 4.0.0
 __gmpfr_fpif_import@Base 4.0.0
 __gmpfr_fprintf@Base 3.1.3
 __gmpfr_inp_str@Base 3.1.3
 __gmpfr_int_ceil_log2@Base 3.1.3
 __gmpfr_isqrt@Base 3.1.3
 __gmpfr_l2b@Base 3.1.3
 __gmpfr_mone@Base 4.0.0
 __gmpfr_mpfr_get_sj@Base 3.1.3
 __gmpfr_mpfr_get_uj@Base 3.1.3
 __gmpfr_one@Base 3.1.3
 __gmpfr_out_str@Base 3.1.3
 __gmpfr_set_sj@Base 3.1.3
 __gmpfr_set_sj_2exp@Base 3.1.3
 __gmpfr_set_uj@Base 3.1.3
 __gmpfr_set_uj_2exp@Base 3.1.3
 __gmpfr_two@Base 3.1.3
 __gmpfr_vasprintf@Base 3.1.3
 __gmpfr_vfprintf@Base 3.1.3
 __gmpfr_vprintf@Base 3.1.3
 __gmpfr_vsnprintf@Base 3.1.3
 __gmpfr_vsprintf@Base 3.1.3
 mpfr_abort_prec_max@Base 3.1.3
 mpfr_abs@Base 3.1.3
 mpfr_acos@Base 3.1.3
 mpfr_acosh@Base 3.1.3
 mpfr_add1@Base 3.1.3
 mpfr_add1sp@Base 3.1.3
 mpfr_add@Base 3.1.3
 mpfr_add_d@Base 3.1.3
 mpfr_add_q@Base 3.1.3
 mpfr_add_si@Base 3.1.3
 mpfr_add_ui@Base 3.1.3
 mpfr_add_z@Base 3.1.3
 mpfr_agm@Base 3.1.3
 mpfr_ai@Base 3.1.3
 mpfr_allocate_func@Base 3.1.3
 mpfr_asin@Base 3.1.3
 mpfr_asinh@Base 3.1.3
 mpfr_asprintf@Base 3.1.3
 mpfr_assert_fail@Base 3.1.3
 mpfr_atan2@Base 3.1.3
 mpfr_atan@Base 3.1.3
 mpfr_atanh@Base 3.1.3
 mpfr_bases@Base 3.1.3
 mpfr_bernoulli_cache@Base 4.0.0
 mpfr_bernoulli_freecache@Base 4.0.0
 mpfr_beta@Base 4.0.0
 mpfr_buildopt_decimal_p@Base 3.1.3
 mpfr_buildopt_float128_p@Base 4.0.0
 mpfr_buildopt_gmpinternals_p@Base 3.1.3
 mpfr_buildopt_sharedcache_p@Base 4.0.0
 mpfr_buildopt_tls_p@Base 3.1.3
 mpfr_buildopt_tune_case@Base 3.1.3
 mpfr_cache@Base 3.1.3
 mpfr_can_round@Base 3.1.3
 mpfr_can_round_raw@Base 3.1.3
 mpfr_cbrt@Base 3.1.3
 mpfr_ceil@Base 3.1.3
 mpfr_ceil_mul@Base 3.1.3
 mpfr_check@Base 3.1.3
 mpfr_check_range@Base 3.1.3
 mpfr_clear@Base 3.1.3
 mpfr_clear_cache@Base 3.1.3
 mpfr_clear_divby0@Base 3.1.3
 mpfr_clear_erangeflag@Base 3.1.3
 mpfr_clear_flags@Base 3.1.3
 mpfr_clear_inexflag@Base 3.1.3
 mpfr_clear_nanflag@Base 3.1.3
 mpfr_clear_overflow@Base 3.1.3
 mpfr_clear_underflow@Base 3.1.3
 mpfr_clears@Base 3.1.3
 mpfr_cmp2@Base 3.1.3
 mpfr_cmp3@Base 3.1.3
 mpfr_cmp@Base 3.1.3
 mpfr_cmp_d@Base 3.1.3
 mpfr_cmp_f@Base 3.1.3
 mpfr_cmp_ld@Base 3.1.3
 mpfr_cmp_q@Base 3.1.3
 mpfr_cmp_si@Base 3.1.3
 mpfr_cmp_si_2exp@Base 3.1.3
 mpfr_cmp_ui@Base 3.1.3
 mpfr_cmp_ui_2exp@Base 3.1.3
 mpfr_cmp_z@Base 3.1.3
 mpfr_cmpabs@Base 3.1.3
 mpfr_const_catalan@Base 3.1.3
 mpfr_const_catalan_internal@Base 3.1.3
 mpfr_const_euler@Base 3.1.3
 mpfr_const_euler_internal@Base 3.1.3
 mpfr_const_log2@Base 3.1.3
 mpfr_const_log2_internal@Base 3.1.3
 mpfr_const_pi@Base 3.1.3
 mpfr_const_pi_internal@Base 3.1.3
 mpfr_copysign@Base 3.1.3
 mpfr_cos@Base 3.1.3
 mpfr_cosh@Base 3.1.3
 mpfr_cot@Base 3.1.3
 mpfr_coth@Base 3.1.3
 mpfr_csc@Base 3.1.3
 mpfr_csch@Base 3.1.3
 mpfr_custom_get_exp@Base 3.1.3
 mpfr_custom_get_kind@Base 3.1.3
 mpfr_custom_get_significand@Base 3.1.3
 mpfr_custom_get_size@Base 3.1.3
 mpfr_custom_init@Base 3.1.3
 mpfr_custom_init_set@Base 3.1.3
 mpfr_custom_move@Base 3.1.3
 mpfr_d_div@Base 3.1.3
 mpfr_d_sub@Base 3.1.3
 mpfr_digamma@Base 3.1.3
 mpfr_dim@Base 3.1.3
 mpfr_div@Base 3.1.3
 mpfr_div_2exp@Base 3.1.3
 mpfr_div_2si@Base 3.1.3
 mpfr_div_2ui@Base 3.1.3
 mpfr_div_d@Base 3.1.3
 mpfr_div_q@Base 3.1.3
 mpfr_div_si@Base 3.1.3
 mpfr_div_ui2@Base 3.1.3
 mpfr_div_ui@Base 3.1.3
 mpfr_div_z@Base 3.1.3
 mpfr_divby0_p@Base 3.1.3
 mpfr_divhigh_n@Base 3.1.3
 mpfr_dump@Base 3.1.3
 mpfr_eint@Base 3.1.3
 mpfr_eq@Base 3.1.3
 mpfr_equal_p@Base 3.1.3
 mpfr_erandom@Base 4.0.0
 mpfr_erangeflag_p@Base 3.1.3
 mpfr_erf@Base 3.1.3
 mpfr_erfc@Base 3.1.3
 mpfr_exp10@Base 3.1.3
 mpfr_exp2@Base 3.1.3
 mpfr_exp@Base 3.1.3
 mpfr_exp_2@Base 3.1.3
 mpfr_exp_3@Base 3.1.3
 mpfr_expm1@Base 3.1.3
 mpfr_extract@Base 3.1.3
 mpfr_fac_ui@Base 3.1.3
 mpfr_fdump@Base 4.0.0
 mpfr_fits_intmax_p@Base 3.1.3
 mpfr_fits_sint_p@Base 3.1.3
 mpfr_fits_slong_p@Base 3.1.3
 mpfr_fits_sshort_p@Base 3.1.3
 mpfr_fits_uint_p@Base 3.1.3
 mpfr_fits_uintmax_p@Base 3.1.3
 mpfr_fits_ulong_p@Base 3.1.3
 mpfr_fits_ushort_p@Base 3.1.3
 mpfr_flags_clear@Base 4.0.0
 mpfr_flags_restore@Base 4.0.0
 mpfr_flags_save@Base 4.0.0
 mpfr_flags_set@Base 4.0.0
 mpfr_flags_test@Base 4.0.0
 mpfr_floor@B

Missing link to gcc-9 at gcc-snapshot page

2018-04-30 Thread Svante Signell
Hello,

On the gcc-snapshot web page 
https://tracker.debian.org/pkg/gcc-snapshot
the VCS:Browse link
http://svn.debian.org/viewsvn/gcccvs/branches/sid/gcc-9/
does not exist. Can you please add that link or change it to point to
the correct page?

Thanks!



gcc-snapshot 1:20180425-1: Updated patch for Hurd gccgo

2018-04-29 Thread Svante Signell
Hello,

The recent gcc-snapshot 1:20180425-1 in sid FTBFS on GNU/Hurd due to
that one patch does not apply correctly. The problem was a comment line
in src/libgo/configure.ac was removed. The attached updated patch,
src_libgo_build.diff, fixes this problem.

Thanks!
Index: gcc-snapshot-20180425/src/libgo/configure.ac
===
--- gcc-snapshot-20180425.orig/src/libgo/configure.ac
+++ gcc-snapshot-20180425/src/libgo/configure.ac
@@ -154,7 +154,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="aix android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -166,6 +166,7 @@ is_dragonfly=no
 is_rtems=no
 is_solaris=no
 is_aix=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -178,6 +179,7 @@ case ${host} in
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
   *-*-aix*)  is_aix=yes; GOOS=aix ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -189,6 +191,7 @@ AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
 AM_CONDITIONAL(LIBGO_IS_AIX, test $is_aix = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -798,6 +801,13 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   AC_DEFINE(SETCONTEXT_CLOBBERS_TLS, 1,
 	[Define if setcontext clobbers TLS variables])
Index: gcc-snapshot-20180425/src/libgo/Makefile.am
===
--- gcc-snapshot-20180425.orig/src/libgo/Makefile.am
+++ gcc-snapshot-20180425/src/libgo/Makefile.am
@@ -429,10 +429,14 @@ else
 if LIBGO_IS_AIX
 runtime_getncpu_file = runtime/getncpu-aix.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-snapshot-20180425/src/libgo/Makefile.in
===
--- gcc-snapshot-20180425.orig/src/libgo/Makefile.in
+++ gcc-snapshot-20180425/src/libgo/Makefile.in
@@ -186,7 +186,8 @@ am__DEPENDENCIES_4 = $(am__DEPENDENCIES_
 	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3)
 libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
 @LIBGO_IS_RTEMS_TRUE@am__objects_1 = rtems-task-variable-add.lo
-@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-gnu.lo
 @LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-aix.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
@@ -762,7 +763,8 @@ noinst_DATA = golang_org/x/net/internal/
 	zstdpkglist.go zdefaultcc.go
 @LIBGO_IS_RTEMS_FALSE@rtems_task_variable_add_file = 
 @LIBGO_IS_RTEMS_TRUE@rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
-@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_I

Re: PATCH: Hurd port of go to gcc-8 (gcc-8-8-20180310+) 16 patches

2018-03-13 Thread Svante Signell
On Mon, 2018-03-12 at 14:44 +0100, Svante Signell wrote:
> On Mon, 2018-03-12 at 13:29 +0100, Svante Signell wrote:
> 
> 
> > The patches really changed are only four:
> > src_libgo_runtime.diff
> > src_libgo_go_go_build_syslist.go.diff
> > src_libgo_go_runtime.diff
> > src_libgo_build.diff
> 
> Correction: five:
> add-gnu-to-libgo-headers.diff

And src_libgo_go_syscall.diff, eventually more. Best to use the complete set.

Regarding test suites the go test results are the same as for e.g. amd64:
This time the problem is with the symbol __libc_start_main@@GLIBC_2.2.6.

tail build/gcc/testsuite/go/go.sum

=== go Summary ===

# of expected passes518
# of untested testcases 834

grep ^FAIL: build/gcc/testsuite/go/go.log
FAIL: checksyms x 8
checksyms: found unexpected symbol "__libc_start_main@@GLIBC_2.2.6"

These problems are reported in debian bug #892167



Bug#892167: Update for gcc-8-8-20180312-2

2018-03-13 Thread Svante Signell
found 892167 8-20180312-2
thanks

The go tests still fails on an amd64 platform:

make -C build check-go 2>&1 | tee ../make-check-go-8-8-20180312-1.log

tail build/gcc/testsuite/go/go.sum

 === go Summary ===

# of expected passes518
# of untested testcases 834

This is due to the following:
less build/gcc/testsuite/go/go.log
checksyms: found unexpected symbol "__libc_start_main@@GLIBC_2.2.5"
FAIL: checksyms

Fortunately all libgo tests now pass:

make -C build/x86_64-linux-gnu/libgo check 2>&1 | tee ../make-check-libgo-8-8-
20180312-2.1.log

tail build/x86_64-linux-gnu/libgo/libgo.sum

=== libgo Summary ===

# of expected passes162



Re: PATCH: Hurd port of go to gcc-8 (gcc-8-8-20180310+) 16 patches

2018-03-12 Thread Svante Signell
On Mon, 2018-03-12 at 13:29 +0100, Svante Signell wrote:


> The patches really changed are only four:
> src_libgo_runtime.diff
> src_libgo_go_go_build_syslist.go.diff
> src_libgo_go_runtime.diff
> src_libgo_build.diff

Correction: five:
add-gnu-to-libgo-headers.diff



Update: Hurd port for gcc-7 go : 7.3.0-8+ for glibc 2.26+

2018-03-10 Thread Svante Signell
Hi,

Attached is the updated patch, src_libgo_build.diff, to build gccgo properly on
Debian GNU/Hurd on gcc-7 (7-7.3.0-{8,9,10}) again after the update of glibc to
2.26+

The libgo tests show the following:

=== libgo Summary ===

# of expected passes119
# of unexpected failures26

Replacing the stub code of netpoll_gnu.go with a poll-based implementation the
libgo tests improves to:

=== libgo Summary ===

# of expected passes124
# of unexpected failures21

The change is reflected in the updated version of src_libgo_go_runtime.diff,
also attached!

Thanks!Index: gcc-7-7.3.0-8.1/src/libgo/configure.ac
===
--- gcc-7-7.3.0-8.1.orig/src/libgo/configure.ac
+++ gcc-7-7.3.0-8.1/src/libgo/configure.ac
@@ -146,7 +146,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -157,6 +157,7 @@ is_openbsd=no
 is_dragonfly=no
 is_rtems=no
 is_solaris=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -168,6 +169,7 @@ case ${host} in
   *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -178,6 +180,7 @@ AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $i
 AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -838,6 +841,14 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 dnl overwrite for the mips* 64bit multilibs, fails on some buildds
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   case "$target" in
Index: gcc-7-7.3.0-8.1/src/libgo/Makefile.am
===
--- gcc-7-7.3.0-8.1.orig/src/libgo/Makefile.am
+++ gcc-7-7.3.0-8.1/src/libgo/Makefile.am
@@ -420,10 +420,14 @@ else
 if LIBGO_IS_NETBSD
 runtime_getncpu_file = runtime/getncpu-bsd.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-7-7.3.0-8.1/src/libgo/Makefile.in
===
--- gcc-7-7.3.0-8.1.orig/src/libgo/Makefile.in
+++ gcc-7-7.3.0-8.1/src/libgo/Makefile.in
@@ -183,7 +183,8 @@ libgo_llgo_la_DEPENDENCIES = $(am__DEPEN
 @LIBGO_IS_LINUX_FALSE@am__objects_2 = thread-sema.lo
 @LIBGO_IS_LINUX_TRUE@am__objects_2 = thread-linux.lo
 @LIBGO_IS_RTEMS_TRUE@am__objects_3 = rtems-task-variable-add.lo
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-gnu.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@am__objects_4 = getncpu-solaris.lo
@@ -768,7 +769,8 @@ toolexeclibgounicode_DATA = \
 @LIBGO_IS_RTEMS_TRUE@rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
 @LIBGO_IS_LINUX_FALSE@runtime_thread_files = runtime/thread-sema.c
 @LIBGO_IS_LINUX_TRUE@runtime_thread_files = runtime/thread-linux.c
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRI

Re: Accepted gcc-8 8-20180308-1 (source) into unstable

2018-03-09 Thread Svante Signell
On Thu, 2018-03-08 at 22:50 +0700, Matthias Klose wrote:
> On 08.03.2018 19:25, Svante Signell wrote:
> > On Thu, 2018-03-08 at 07:52 +, Matthias Klose wrote:
> > > 
> > > Changes:
> > >  gcc-8 (8-20180308-1) unstable; urgency=medium
> > >  .
> > >    * GCC 8 snapshot, taken from the trunk 20180308 (r258348).
> > >    * Update GDC to 20180304.
> > >  .
> > >    [ Matthias Klose ]
> > > 
> > >    * Remove the go patches for the Hurd. Unmaintained.
> > 
> > Hi Mathias, the Hurd patches are not umaintained. The problem was that when
> > the switch from glibc for 2.25 to 2.26 in January-February I was AFK. And
> > glibc 2.26 broke the patches. Contacting the gccgo upstream and other Hurd
> > porters in beginning of, March, I found out how to modify the patches to
> > make the gccgo port of Hurd work again. I was just about to send you updated
> > patches when this new version arrived. I'll build gccgo again with version
> > 8-20180308-1 and send you a complete set of updated patches (even though
> > only some had to be modified): Is that OK?
> 
> well, it's not just the two past months, the patches were not integrated for
> GCC 7 either. I'm not convinced that we should maintain these in the distro
> before they are landed at least in golang/GCC trunk.

FYI one of the patches for mksigtab.sh is already committed upstream. I'll send
the complete set of patches for gcc-8 in a separate mail to specifically gcc-
patches. The test results are even better than before, and some failures are
common to Linux. Hopefully upstream will accept the patches for GNU/Hurd this
time. And I hope you will include them in next snapshot of gcc-8 in the
meantime.

Looking at the build-depends of gcc-7, gcc-8-base is now a dependency. That
seems strange for me. Furthermore, in the changelogs of 7.3.0-2 and 7.3.0-3 you
write:
* Stop building more packages now built by gcc-8.

Which packages are referred to with the above line?

For example, building gcc-7 on GNU/Hurd:
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++
and on gcc-8:
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++
i.e. the same list!

With this in mind I don't understand the comment above nor the build-dependency
on gcc-8-base, which mailny gives the base directory structure for gcc-8??

Thanks!



Re: Accepted gcc-8 8-20180308-1 (source) into unstable

2018-03-08 Thread Svante Signell
On Thu, 2018-03-08 at 07:52 +, Matthias Klose wrote:
> 
> Changes:
>  gcc-8 (8-20180308-1) unstable; urgency=medium
>  .
>    * GCC 8 snapshot, taken from the trunk 20180308 (r258348).
>    * Update GDC to 20180304.
>  .
>    [ Matthias Klose ]
> 
>    * Remove the go patches for the Hurd. Unmaintained.

Hi Mathias, the Hurd patches are not umaintained. The problem was that when the
switch from glibc for 2.25 to 2.26 in January-February I was AFK. And glibc 2.26
broke the patches. Contacting the gccgo upstream and other Hurd porters in
beginning of, March, I found out how to modify the patches to make the gccgo
port of Hurd work again. I was just about to send you updated patches when this
new version arrived. I'll build gccgo again with version 8-20180308-1 and send
you a complete set of updated patches (even though only some had to be
modified): Is that OK?

It would be nice to be notified about build failures of gcc-* on GNU/Hurd, is
that possible to automate?



Bug#892167: gcc-8: go and libgo testsuites fails on amd64 (and other arches)

2018-03-06 Thread Svante Signell
Source: gcc-8
Version: 8-20180218-1
Severity: important
Tags: sid, buster
Usertags: testsuite, gccgo, libgo, amd64

Hi,

Running the testsuite for go and libgo with the command

make -C build check-go 2>&1 | tee ../make-check-go-8-8-20180218-1.log

reveals that most go tests fails:
(The test suite is disabled in the buildds compilation of gcc-8)

tail build/gcc/testsuite/go/go.sum

 === go Summary ===

# of expected passes518
# of untested testcases 834

This is due to the following:
less build/gcc/testsuite/go/go.log
checksyms: found unexpected symbol "__libc_start_main@@GLIBC_2.2.5"
FAIL: checksyms


Also four libgo tests fail:

tail build/x86_64-linux-gnu/libgo/libgo.sum

=== libgo Summary for unix ===

# of expected passes158
# of unexpected failures4

less  build/x86_64-linux-gnu/libgo/libgo.log
FAIL: crypto/sha1
FAIL: golang_org/x/crypto/chacha20poly1305/internal/chacha20
FAIL: golang_org/x/crypto/curve25519
FAIL: golang_org/x/net/lex/httplex

All fails are due to: (the error is repeated hundreds of times)

/tmp/ccjPhx1C.s:9920: Error: leb128 operand is an undefined symbol:
.LVU42
FAIL: crypto/sha1

/tmp/ccJQhkXG.s:8490: Error: leb128 operand is an undefined symbol:
.LVU355
FAIL: golang_org/x/crypto/chacha20poly1305/internal/chacha20

/tmp/ccsHI96b.s:18224: Error: leb128 operand is an undefined symbol:
.LVU1591
FAIL: golang_org/x/crypto/curve25519


/tmp/ccidCXTz.s:17050: Error: leb128 operand is an undefined symbol:
.LVU531
FAIL: golang_org/x/net/lex/httplex

The above errors does also happen on other atchtectures, but only
reported here for amd64.

Thanks!



Re: How to build only amd64 and avoid building gcc for 32 and x32?

2017-12-10 Thread Svante Signell
On Sat, 2017-12-09 at 00:42 +0100, Svante Signell wrote:
> Hi,
> 
> The title says it all. It is a little annoying to have to build gcc-x
> for all multilib architectures. Where to set a build only for amd64 in
> debian/rules* or DEB_BUILD_OPTIONS?
> 
> Trying to build gcc-8-8-20171128-1 fails with:
> /usr/include/gnu/stubs.h:13:11: fatal error: gnu/stubs-x32.h: No such
> file or directory
>  # include 

Sorry, that was my fault. I had too old tools installed. Doing apt-get 
build-dep 
gcc-8 solved that problem.
 
> And I'm not the slightest interested in the 32|x32 builds!

This question is still unanswered. How to only enable build of amd64, not 32,
not x32.

BTW: gcc-8-8-20171209-1 FTBFS on amd64 and i386. No bug has been filed yet
though.



How to build only amd64 and avoid building gcc for 32 and x32?

2017-12-08 Thread Svante Signell
Hi,

The title says it all. It is a little annoying to have to build gcc-x
for all multilib architectures. Where to set a build only for amd64 in
debian/rules* or DEB_BUILD_OPTIONS?

Trying to build gcc-8-8-20171128-1 fails with:
/usr/include/gnu/stubs.h:13:11: fatal error: gnu/stubs-x32.h: No such
file or directory
 # include 

And I'm not the slightest interested in the 32|x32 builds!



Re: Hurd port for gcc-7 go PATCH 1-3(15)

2017-11-16 Thread Svante Signell
On Thu, 2017-11-16 at 14:12 +0100, Svante Signell wrote:
> On Wed, 2017-11-15 at 21:54 +0100, Svante Signell wrote:
> > 
> 
> Attached is an updated patch for gcc-7. An updated patch for gcc-8 will follow
> shortly when I have build tested gcc-8 go on both Linux and Hurd.
> 
> The patch for src/libgo/mksysinfo.sh worked fine in gcc-5 and gcc-6. The
> problem is that in gcc-7 and gcc-8 generation of build/ triplet>/libgo/sysinfo.go is made differently.

Well, in gcc-5 and gcc-6 the gccgo patches in debian/rules.patch are
conditional, and were not in gcc-7-7.2.0-15. In gcc-7-7.2.0-16 they are
conditional again.

> The Hurd-specific entry about SYS_IOCTL had to be moved after:
> 
> # The syscall numbers.  We force the names to upper case.
> grep '^const _SYS_' gen-sysinfo.go | \
>   sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
>   while read sys; do
> sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
> echo "const $sup = _$sys" >> ${OUT}
>   done

For completeness updated patches for gcc-6 and gcc-8 are attached.

gcc-6-6.4.0-10: src_libgo_mksysinfo.sh.diff
gcc-8-8-20171108-1: srs_libgo_build.diff

And thank you for finding the bug in the patches by making them (temporarily)
unconditional.

Thanks!Index: gcc-6-6.4.0/src/libgo/mksysinfo.sh
===
--- gcc-6-6.4.0.orig/src/libgo/mksysinfo.sh
+++ gcc-6-6.4.0/src/libgo/mksysinfo.sh
@@ -304,6 +304,13 @@ echo '#include ' | ${CC} -x c -
   egrep '#define E[A-Z0-9_]+ ' | \
   sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}
 
+# Special treatment of EWOULDBLOCK for GNU/Hurd
+# /usr/include/bits/errno.h: #define EWOULDBLOCK EAGAIN
+if egrep 'define EWOULDBLOCK EAGAIN' gen-sysinfo.go > /dev/null 2>&1; then
+  egrep '^const EWOULDBLOCK = Errno(_EWOULDBLOCK)' ${OUT} | \
+sed -i -e 's/_EWOULDBLOCK/_EAGAIN/' ${OUT}
+fi
+
 # The O_xxx flags.
 egrep '^const _(O|F|FD)_' gen-sysinfo.go | \
   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
@@ -362,6 +369,11 @@ grep '^const _SYS_' gen-sysinfo.go | \
 echo "const $sup = _$sys" >> ${OUT}
   done
 
+# Special treatment of SYS_IOCTL for GNU/Hurd
+if ! grep '^const SYS_IOCTL' ${OUT} > /dev/null 2>&1; then
+  echo "const SYS_IOCTL = 0" >> ${OUT}
+fi
+
 # The GNU/Linux support wants to use SYS_GETDENTS64 if available.
 if ! grep '^const SYS_GETDENTS ' ${OUT} >/dev/null 2>&1; then
   echo "const SYS_GETDENTS = 0" >> ${OUT}
@@ -676,6 +688,11 @@ grep '^type _tms ' gen-sysinfo.go | \
 
 # The stat type.
 # Prefer largefile variant if available.
+# Special treatment of st_dev for GNU/Hurd
+# /usr/include/i386-gnu/bits/stat.h: #define st_dev st_fsid
+if grep 'define st_dev st_fsid' gen-sysinfo.go > /dev/null 2>&1; then
+  sed -i -e 's/; st_fsid/; st_dev/' gen-sysinfo.go
+fi
 stat=`grep '^type _stat64 ' gen-sysinfo.go || true`
 if test "$stat" != ""; then
   grep '^type _stat64 ' gen-sysinfo.go
Index: gcc-8-8-20171108/src/libgo/configure.ac
===
--- gcc-8-8-20171108.orig/src/libgo/configure.ac
+++ gcc-8-8-20171108/src/libgo/configure.ac
@@ -154,7 +154,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="aix android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -166,6 +166,7 @@ is_dragonfly=no
 is_rtems=no
 is_solaris=no
 is_aix=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -178,6 +179,7 @@ case ${host} in
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
   *-*-aix*)  is_aix=yes; GOOS=aix ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -189,6 +191,7 @@ AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
 AM_CONDITIONAL(LIBGO_IS_AIX, test $is_aix = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -853,6 +856,13 @@ main ()
 CFLAGS="$CFL

Re: Hurd port for gcc-7 go PATCH 1-3(15)

2017-11-16 Thread Svante Signell
On Wed, 2017-11-15 at 21:54 +0100, Svante Signell wrote:
> On Wed, 2017-11-15 at 21:40 +0100, Matthias Klose wrote:
> > On 06.11.2017 16:36, Svante Signell wrote:
> > > Hi,
> > > 
> > > Attached are patches to enable gccgo to build properly on Debian
> > > GNU/Hurd on gcc-7 (7-7.2.0-12).
> > 
> > sysinfo.go:6744:7: error: redefinition of 'SYS_IOCTL'
> >  const SYS_IOCTL = _SYS_ioctl
> >    ^
> > sysinfo.go:6403:7: note: previous definition of 'SYS_IOCTL' was here
> >  const SYS_IOCTL = 0
> >    ^
> > the patches break the build on any Linux architecture.  Please could you
> > test
> > your patches against a linux target as well?
> 
> I'm really sorry. I regularly do that, but missed this one for gcc-7. Do you
> mean the patches against gcc-8 you asked me for? You wrote that gcc-7 is not
> of
> interest and I should concentrate on gcc-8.
> 
> Again, I'm really sorry. Will fix this tomorrow hopefully.
> 
> Thanks!

Attached is an updated patch for gcc-7. An updated patch for gcc-8 will follow
shortly when I have build tested gcc-8 go on both Linux and Hurd.

The patch for src/libgo/mksysinfo.sh worked fine in gcc-5 and gcc-6. The problem
is that in gcc-7 and gcc-8 generation of build//libgo/sysinfo.go
is made differently.

The Hurd-specific entry about SYS_IOCTL had to be moved after:

# The syscall numbers.  We force the names to upper case.
grep '^const _SYS_' gen-sysinfo.go | \
  sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
  while read sys; do
sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
echo "const $sup = _$sys" >> ${OUT}
  done

Thanks!Index: gcc-7-7.2.0/src/libgo/configure.ac
===
--- gcc-7-7.2.0.orig/src/libgo/configure.ac
+++ gcc-7-7.2.0/src/libgo/configure.ac
@@ -146,7 +146,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -157,6 +157,7 @@ is_openbsd=no
 is_dragonfly=no
 is_rtems=no
 is_solaris=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -168,6 +169,7 @@ case ${host} in
   *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -178,6 +180,7 @@ AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $i
 AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -838,6 +841,14 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 dnl overwrite for the mips* 64bit multilibs, fails on some buildds
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   case "$target" in
Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -420,10 +420,14 @@ else
 if LIBGO_IS_NETBSD
 runtime_getncpu_file = runtime/getncpu-bsd.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-7-7.2.0/src/libgo/Makefile.in
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0/src/libgo/Makefile.in
@@ -183,7 +183,8 @@ libgo_llgo_la_DEPENDENCIES = $(am__DEPEN
 @LIBGO_IS_LINUX_FALSE@am__objects_2 = thread-sema.lo
 @LIBGO_IS_LINUX_TRUE@am__objects_2 = thread-linux.lo
 @LIBGO_IS_RTEMS_TRUE@am__objects_3 = rtems-task-variable-add.lo
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NE

Re: Hurd port for gcc-7 go PATCH 1-3(15)

2017-11-15 Thread Svante Signell
On Wed, 2017-11-15 at 21:40 +0100, Matthias Klose wrote:
> On 06.11.2017 16:36, Svante Signell wrote:
> > Hi,
> > 
> > Attached are patches to enable gccgo to build properly on Debian
> > GNU/Hurd on gcc-7 (7-7.2.0-12).
> 
> sysinfo.go:6744:7: error: redefinition of 'SYS_IOCTL'
>  const SYS_IOCTL = _SYS_ioctl
>    ^
> sysinfo.go:6403:7: note: previous definition of 'SYS_IOCTL' was here
>  const SYS_IOCTL = 0
>    ^
> the patches break the build on any Linux architecture.  Please could you test
> your patches against a linux target as well?

I'm really sorry. I regularly do that, but missed this one for gcc-7. Do you
mean the patches against gcc-8 you asked me for? You wrote that gcc-7 is not of
interest and I should concentrate on gcc-8.

Again, I'm really sorry. Wil fix this tomorrow hopefully.

Thanks!



Hurd port for gcc-8 go PATCH 11-15(15)

2017-11-10 Thread Svante Signell
* add-gnu-to-libgo-headers.diff: Add gnu to libgo headers for build.
* add-gnu-to-libgo-test-headers.diff: Add gnu to libgo headers for tests.
* src_libgo_go_go_build_syslist.go.diff: Add gnu to the goosList.
* src_libgo_go_syscall_syscall_gnu_test.go.diff: gnu-specific file for tests
involving struct flock.
* src_libgo_testsuite_gotest.diff: gnu-specific gotest output.Index: gcc-8-8-20171108-1.1/src/libgo/go/archive/tar/stat_atim.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/archive/tar/stat_atim.go
+++ gcc-8-8-20171108-1.1/src/libgo/go/archive/tar/stat_atim.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 linux dragonfly openbsd solaris
+// +build gnu linux dragonfly openbsd solaris
 
 package tar
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/cmd/go/internal/base/signal_unix.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/cmd/go/internal/base/signal_unix.go
+++ gcc-8-8-20171108-1.1/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 linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package base
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/crypto/x509/root_unix.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/crypto/x509/root_unix.go
+++ gcc-8-8-20171108-1.1/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 linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package x509
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/net/interface_stub.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/net/interface_stub.go
+++ gcc-8-8-20171108-1.1/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
+// +build aix nacl gnu
 
 package net
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/net/internal/socktest/switch_unix.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/net/internal/socktest/switch_unix.go
+++ gcc-8-8-20171108-1.1/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 linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package socktest
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/net/port_unix.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/net/port_unix.go
+++ gcc-8-8-20171108-1.1/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 linux netbsd openbsd solaris nacl
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris nacl
 
 // Read system port mappings from /etc/services
 
Index: gcc-8-8-20171108-1.1/src/libgo/go/os/dir_largefile.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/os/dir_largefile.go
+++ gcc-8-8-20171108-1.1/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-8-8-20171108-1.1/src/libgo/go/os/dir_regfile.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/os/dir_regfile.go
+++ gcc-8-8-20171108-1.1/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-8-8-20171108-1.1/src/libgo/go/os/dir_unix.go
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/go/os/dir_unix.go
+++ gcc-8-8-20171108-1.1/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 linux nacl netbsd openbs

Hurd port for gcc-8 go PATCH 4-10(15)

2017-11-10 Thread Svante Signell
* src_libgo_build.diff: configure.ac, Makefile.* and shell script patches.
* src_libgo_go_crypto.diff: Certificate go files.
* src_libgo_go_net.diff: OS-specific net go files.
* src_libgo_go_os.diff: OS-specific os go files.
* src_libgo_go_runtime.diff: OS-specific runtime go files.
* src_libgo_go_syscall.diff: OS-specific syscall go files.
* src_libgo_runtime.diff: OS-specific runtime C files.Index: gcc-8-8-20171108-1.1/src/libgo/configure.ac
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/configure.ac
+++ gcc-8-8-20171108-1.1/src/libgo/configure.ac
@@ -154,7 +154,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="aix android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -166,6 +166,7 @@ is_dragonfly=no
 is_rtems=no
 is_solaris=no
 is_aix=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -178,6 +179,7 @@ case ${host} in
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
   *-*-aix*)  is_aix=yes; GOOS=aix ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -189,6 +191,7 @@ AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
 AM_CONDITIONAL(LIBGO_IS_AIX, test $is_aix = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -853,6 +856,13 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 dnl overwrite for the mips* 64bit multilibs, fails on some buildds
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   case "$target" in
Index: gcc-8-8-20171108-1.1/src/libgo/Makefile.am
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/Makefile.am
+++ gcc-8-8-20171108-1.1/src/libgo/Makefile.am
@@ -431,10 +431,14 @@ else
 if LIBGO_IS_AIX
 runtime_getncpu_file = runtime/getncpu-aix.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-8-8-20171108-1.1/src/libgo/Makefile.in
===
--- gcc-8-8-20171108-1.1.orig/src/libgo/Makefile.in
+++ gcc-8-8-20171108-1.1/src/libgo/Makefile.in
@@ -187,7 +187,8 @@ am__DEPENDENCIES_4 = $(am__DEPENDENCIES_
 	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3)
 libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
 @LIBGO_IS_RTEMS_TRUE@am__objects_1 = rtems-task-variable-add.lo
-@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
+@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-gnu.lo
 @LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-aix.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
@@ -234,10 +235,10 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLF
 SOURCES = $(libgobegin_llgo_a_SOURCES) $(libgobegin_a_SOURCES) \
 	$(libgolibbegin_a_SOURCES) $(libgotool_a_SOURCES) \
 	$(libgo_llgo_la_SOURCES) $(libgo_la_SOURCES)
-MULTISRCTOP = 
-MULTIBUILDTOP = 
-MULTIDIRS = 
-MULTISUBDIR = 
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
 MULTIDO = true
 MULTICLEAN = true
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -469,7 +470,7 @@ AM_LDFLAGS = $(am__append_1) $(am__appen
 @LIBGO_IS_AIX_TRUE@EXTRA_libgo_la_DEPENDENCIES = libgo.imp
 
 # Multilib support.
-MAKEOVERRIDES = 
+MAKEOVERRIDES =
 
 # W

Hurd port for gcc-8 go PATCH 1-3(15)

2017-11-10 Thread Svante Signell
Hi,

Attached are patches to enable gccgo to build properly on Debian
GNU/Hurd on gcc-8 (8-8-20171108-1).

The first two patches are Debian-specific:
Enable build of gccgo for GNU/Hurd:
* debian_rules.defs.diff
Define patches for the generated series file:
* debian_rules.patch.diff

The third enables split-stack support:
* src_gcc_config_i386_gnu.h.diff

The test suite results are as follows:

=== go Summary ===

# of expected passes7359
# of unexpected failures13
# of expected failures  1
# of untested testcases 7
# of unsupported tests  2

=== libgo Summary ===

# of expected passes128
# of unexpected failures27

Most failing go tests and more than half of the libgo tests are runtime errors
probably due to exception handling not working as expected, stopping execution
with SIGSEGV. These issues are also present in  the gcc-6 port (where libgo is
implemented with more C code) and might be due to issues in gnumach/hurd/glibc
yet to be solved.

Another large group of tests, mainly in libgo, fails with SIGILL. The reason for
these failures are also currently unknown. Maybe it is still some more things to
address with the port, but the cause can also be due to the above. Unfortunately
gdb and rpctrace are not especially usable, the former due to hangs, and the
second due to bugs in multi-thread support.

Another issue is that /proc/self/exe has to return an absolute path for the
built program go-7 to execute properly. This is solved by a pending patch for
glibc in Debian and will be available in the next upload of glibc-2.24.
Adding to this, the executable ./build/gotools/go does work displaying the help
text, but e.g. ./build/gotools/go env exits with a SIGILL: Illegal instruction.

Furthermore, since more code is written in go the previous routine
src/libgo/rutime/netpoll_select.c has to be rewritten in go. The supplied file
src/libgo/go/runtime/netpoll_gnu.go is merely a stub for now and has to be
implemented using either select or poll since neither epoll or kqueue or exists
in GNU/Hurd. I'm currently working on an implementation using poll(2). 

Nevertheless, it seems like not so much is left for gccgo working
properly on GNU/Hurd, as for gcc-6. However, since I'm currently stuck, having
spent a lot of time debugging, it is time to hand over to more people taking a
look at this port.

More detailed information on specific issues will be supplied on request.

Thanks!--- a/debian/rules.defs.orig	2017-08-14 14:40:23.0 +0200
+++ b/debian/rules.defs		2017-08-14 15:26:42.0 +0200
@@ -807,7 +807,7 @@
 ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric))
   go_no_cpus := $(filter-out arm, $(go_no_cpus))
 endif
-go_no_systems := gnu kfreebsd-gnu
+go_no_systems := kfreebsd
 
 ifneq ($(with_base_only),yes)
   ifneq ($(separate_lang),yes)
--- a/debian/rules.patch	2017-09-06 11:49:38.0 +0200
+++ b/debian/rules.patch	2017-09-06 12:02:13.0 +0200
@@ -228,7 +228,21 @@
 endif
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
-  debian_patches += hurd-changes
+  debian_patches += hurd-changes \
+src_gcc_config_i386_gnu.h \
+src_libgo_build \
+src_libgo_runtime \
+src_libgo_go_crypto \
+src_libgo_go_net \
+src_libgo_go_os \
+src_libgo_go_runtime \
+src_libgo_go_syscall \
+src_libgo_go_go_build_syslist.go \
+add-gnu-to-libgo-headers \
+add-gnu-to-libgo-test-headers \
+src_libgo_go_syscall_syscall_gnu_test.go \
+src_libgo_testsuite_gotest \
+
 endif
 
 debian_patches += gcc-ice-dump
Index: gcc-8-8-20171108-1.1/src/gcc/config/i386/gnu.h
===
--- gcc-8-8-20171108-1.1.orig/src/gcc/config/i386/gnu.h
+++ gcc-8-8-20171108-1.1/src/gcc/config/i386/gnu.h
@@ -37,11 +37,14 @@ along with GCC.  If not, see 

Hurd port for gcc-7 go PATCH 11-15(15)

2017-11-06 Thread Svante Signell
* add-gnu-to-libgo-headers.diff: Add gnu to libgo headers for build.
* add-gnu-to-libgo-test-headers.diff: Add gnu to libgo headers for tests.
* src_libgo_go_go_build_syslist.go.diff: Add gnu to the goosList.
* src_libgo_go_syscall_syscall_gnu_test.go.diff: gnu-specific file for tests
involving struct flock.
* src_libgo_testsuite_gotest.diff: gnu-specific gotest output.
Index: gcc-7-7.2.0-12.1/src/libgo/go/archive/tar/stat_atim.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/archive/tar/stat_atim.go
+++ gcc-7-7.2.0-12.1/src/libgo/go/archive/tar/stat_atim.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 linux dragonfly openbsd solaris
+// +build gnu linux dragonfly openbsd solaris
 
 package tar
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/cmd/go/signal_unix.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/cmd/go/signal_unix.go
+++ gcc-7-7.2.0-12.1/src/libgo/go/cmd/go/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 darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package main
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/crypto/x509/root_unix.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/crypto/x509/root_unix.go
+++ gcc-7-7.2.0-12.1/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 dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package x509
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/net/fd_poll_runtime.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/net/fd_poll_runtime.go
+++ gcc-7-7.2.0-12.1/src/libgo/go/net/fd_poll_runtime.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 darwin dragonfly freebsd linux netbsd openbsd windows solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd windows solaris
 
 package net
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/net/interface_stub.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/net/interface_stub.go
+++ gcc-7-7.2.0-12.1/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 nacl
+// +build nacl gnu
 
 package net
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/net/internal/socktest/switch_unix.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/net/internal/socktest/switch_unix.go
+++ gcc-7-7.2.0-12.1/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 darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
 
 package socktest
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/net/port_unix.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/net/port_unix.go
+++ gcc-7-7.2.0-12.1/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 darwin dragonfly freebsd linux netbsd openbsd solaris nacl
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris nacl
 
 // Read system port mappings from /etc/services
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/os/dir_largefile.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/os/dir_largefile.go
+++ gcc-7-7.2.0-12.1/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 linux solaris,386 solaris,sparc
+// +build gnu linux solaris,386 solaris,sparc
 
 package os
 
Index: gcc-7-7.2.0-12.1/src/libgo/go/os/dir_regfile.go
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/go/os/dir_regfile.go
+++ gcc-7-7.2.0-12.1/src/libgo/go/os/dir_regfile.go
@@ -5,6 +5,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !gnu
 // +build !linux
 // +build !solaris !386
 // +build !solaris !sparc
Index: gcc-7-7.2.0-12.1/src/lib

Hurd port for gcc-7 go PATCH 4-10(15)

2017-11-06 Thread Svante Signell
* src_libgo_build.diff: configure.ac, Makefile.* and shell script patches.
* src_libgo_go_crypto.diff: Certificate go files.
* src_libgo_go_net.diff: OS-specific net go files.
* src_libgo_go_os.diff: OS-specific os go files.
* src_libgo_go_runtime.diff: OS-specific runtime go files.
* src_libgo_go_syscall.diff: OS-specific syscall go files.
* src_libgo_runtime.diff: OS-specific runtime C files.Index: gcc-7-7.2.0-12.1/src/libgo/configure.ac
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/configure.ac
+++ gcc-7-7.2.0-12.1/src/libgo/configure.ac
@@ -146,7 +146,7 @@ AC_SUBST(go_include)
 # All known GOOS values.  This is the union of all operating systems
 # supported by the gofrontend and all operating systems supported by
 # the gc toolchain.
-ALLGOOS="android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
+ALLGOOS="android darwin dragonfly freebsd irix gnu linux netbsd openbsd plan9 rtems solaris windows"
 
 is_darwin=no
 is_freebsd=no
@@ -157,6 +157,7 @@ is_openbsd=no
 is_dragonfly=no
 is_rtems=no
 is_solaris=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -168,6 +169,7 @@ case ${host} in
   *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -178,6 +180,7 @@ AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $i
 AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
 AC_SUBST(GOOS)
 AC_SUBST(ALLGOOS)
@@ -838,6 +841,14 @@ main ()
 CFLAGS="$CFLAGS_hold"
 LIBS="$LIBS_hold"
 ])
+
+case ${host} in
+  *-*-gnu*)
+  LIBS="$LIBS -lpthread"
+  AC_SUBST(LIBS)
+  ;;
+esac
+
 dnl overwrite for the mips* 64bit multilibs, fails on some buildds
 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
   case "$target" in
Index: gcc-7-7.2.0-12.1/src/libgo/Makefile.am
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0-12.1/src/libgo/Makefile.am
@@ -420,10 +420,14 @@ else
 if LIBGO_IS_NETBSD
 runtime_getncpu_file = runtime/getncpu-bsd.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
 endif
+endif
 endif
 endif
 endif
Index: gcc-7-7.2.0-12.1/src/libgo/Makefile.in
===
--- gcc-7-7.2.0-12.1.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0-12.1/src/libgo/Makefile.in
@@ -183,7 +183,8 @@ libgo_llgo_la_DEPENDENCIES = $(am__DEPEN
 @LIBGO_IS_LINUX_FALSE@am__objects_2 = thread-sema.lo
 @LIBGO_IS_LINUX_TRUE@am__objects_2 = thread-linux.lo
 @LIBGO_IS_RTEMS_TRUE@am__objects_3 = rtems-task-variable-add.lo
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-none.lo
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-gnu.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_4 = getncpu-bsd.lo
 @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@am__objects_4 = getncpu-solaris.lo
@@ -768,7 +769,8 @@ toolexeclibgounicode_DATA = \
 @LIBGO_IS_RTEMS_TRUE@rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
 @LIBGO_IS_LINUX_FALSE@runtime_thread_files = runtime/thread-sema.c
 @LIBGO_IS_LINUX_TRUE@runtime_thread_files = runtime/thread-linux.c
-@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
+@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_GNU_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FA

Hurd port for gcc-7 go PATCH 1-3(15)

2017-11-06 Thread Svante Signell
Hi,

Attached are patches to enable gccgo to build properly on Debian
GNU/Hurd on gcc-7 (7-7.2.0-12).

The first two patches are Debian-specific:
Enable build of gccgo for GNU/Hurd:
* debian_rules.defs.diff
Define patches for the generated series file:
* debian_rules.patch.diff

The third enables split-stack support:
* src_gcc_config_i386_gnu.h.diff

The test suite results are as follows:

=== go Summary ===

# of expected passes7359
# of unexpected failures13
# of expected failures  1
# of untested testcases 7
# of unsupported tests  2

=== libgo Summary ===

# of expected passes119
# of unexpected failures26

Most failing go tests and more than half of the libgo tests are runtime errors
probably due to exception handling not working as expected, stopping execution
with SIGSEGV. These issues are also present in  the gcc-6 port (where libgo is
implemented with more C code) and might be due to issues in gnumach/hurd/glibc
yet to be solved.

Another large group of tests, mainly in libgo, fails with SIGILL. The reason for
these failures are also currently unknown. Maybe it is still some more things to
address with the port, but the cause can also be due to the above. Unfortunately
gdb and rpctrace are not especially usable, the former due to hangs, and the
second due to bugs?? in multi-thread support.

Another issue is that /proc/self/exe has to return an absolute path for the
built program go-7 to execute properly. This is solved by a pending patch for
glibc in Debian and will be available in the next upload of glibc-2.24.
Adding to this, the executable ./build/gotools/go does work displaying the help
text, but e.g. ./build/gotools/go env exits with a SIGILL: Illegal instruction.

Furthermore, since more code is written in go the previous routine
src/libgo/rutime/netpoll_select.c has to be rewritten in go. The supplied file
src/libgo/go/runtime/netpoll_gnu.go is merely a stub for now and has to be
implemented using either select or poll since neither epoll or kqueue or exists
in GNU/Hurd.

Nevertheless, it seems like not so much is left for gccgo working
properly on GNU/Hurd, as for gcc-6. However, since I'm currently stuck, having
spent a lot of time debugging, it is time to hand over to more people taking a
look at this port.

More detailed information on specific issues will be supplied on request.

Thanks!
--- a/debian/rules.defs.orig	2017-08-14 14:40:23.0 +0200
+++ b/debian/rules.defs		2017-08-14 15:26:42.0 +0200
@@ -804,7 +804,7 @@
 ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric))
   go_no_cpus := $(filter-out arm, $(go_no_cpus))
 endif
-go_no_systems := gnu kfreebsd-gnu
+go_no_systems := kfreebsd
 
 ifneq ($(with_base_only),yes)
   ifneq ($(separate_lang),yes)
--- a/debian/rules.patch	2017-09-06 11:49:38.0 +0200
+++ b/debian/rules.patch	2017-09-06 12:02:13.0 +0200
@@ -235,7 +235,21 @@
 endif
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
-  debian_patches += hurd-changes
+  debian_patches += hurd-changes \
+src_gcc_config_i386_gnu.h \
+src_libgo_build \
+src_libgo_runtime \
+src_libgo_go_crypto \
+src_libgo_go_net \
+src_libgo_go_os \
+src_libgo_go_runtime \
+src_libgo_go_syscall \
+src_libgo_go_go_build_syslist.go \
+add-gnu-to-libgo-headers \
+add-gnu-to-libgo-test-headers \
+src_libgo_go_syscall_syscall_gnu_test.go \
+src_libgo_testsuite_gotest \
+
 endif
 
 debian_patches += gcc-ice-dump
Index: gcc-7-7.2.0-12.1/src/gcc/config/i386/gnu.h
===
--- gcc-7-7.2.0-12.1.orig/src/gcc/config/i386/gnu.h
+++ gcc-7-7.2.0-12.1/src/gcc/config/i386/gnu.h
@@ -37,11 +37,14 @@ along with GCC.  If not, see 

Bug#873929: gcc7: Enable libgo tests and rebuilds with make -C

2017-09-06 Thread Svante Signell
On Sat, 2017-09-02 at 14:44 +0200, Svante Signell wrote:
> On Sat, 2017-09-02 at 04:07 +0200, Matthias Klose wrote:

> If I understand you correctly the behavior in gcc-6 is correct.
> Attached is an updated libgo-testsuite.diff file fixing the if-then-
> else-fi logic in the same way as for gcc-6 (including the whitespace
> fix). Tested on an amd64 box, and only the 64-bit target is run.
> 
> The other patch, libgo-Makefile.diff, adds to the CLEANFILES enabling
> libgo rebuilds with make -C ...
> 

Neither patch made it to gcc-7-7.2.0-4. Why?
(libgo-Makefile.diff should be named libgo-cleanfiles.diff)

Attaching the patches again.
Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -1423,7 +1423,9 @@ mostlyclean-local:
 	find . -name '*-testsum' -print | xargs rm -f
 	find . -name '*-testlog' -print | xargs rm -f
 
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
 
 clean-local:
 	find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
Index: gcc-7-7.2.0/src/libgo/Makefile.in
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0/src/libgo/Makefile.in
@@ -1347,7 +1347,10 @@ TEST_PACKAGES = \
 	unicode/utf8/check
 
 MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
+
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
# DP: Only run the libgo testsuite for flags configured in RUNTESTFLAGS

Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -929,7 +929,7 @@ BUILDGOX = \
 	$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
 
 GOTESTFLAGS =
-GOBENCH = 
+GOBENCH =
 
 # Check a package.
 CHECK = \
@@ -948,6 +948,12 @@ CHECK = \
 	$(MKDIR_P) $(@D); \
 	rm -f $@-testsum $@-testlog; \
 	files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \
+	run_check=yes; \
+	MULTILIBDIR="$(MULTILIBDIR)"; \
+	case "$$MULTILIBDIR" in /64|/x32) \
+	  echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
+	esac; \
+	if test "$$run_check" = "yes"; then \
 	if test "$(USE_DEJAGNU)" = "yes"; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
 	elif test "$(GOBENCH)" != ""; then \
@@ -963,6 +969,7 @@ CHECK = \
 	echo "FAIL: $(@D)" > $@-testsum; \
 	exit 1; \
 	  fi; \
+	fi; \
 	fi
 
 # Build all packages before checking any.
Index: gcc-7-7.2.0/src/libgo/Makefile.in
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0/src/libgo/Makefile.in
@@ -1085,7 +1085,7 @@ BUILDGOX = \
 	$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
 
 GOTESTFLAGS = 
-GOBENCH = 
+GOBENCH =
 
 # Check a package.
 CHECK = \
@@ -1104,6 +1104,12 @@ CHECK = \
 	$(MKDIR_P) $(@D); \
 	rm -f $@-testsum $@-testlog; \
 	files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \
+	run_check=yes; \
+	MULTILIBDIR="$(MULTILIBDIR)"; \
+	case "$$MULTILIBDIR" in /64|/x32) \
+	  echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
+	esac; \
+	if test "$$run_check" = "yes"; then \
 	if test "$(USE_DEJAGNU)" = "yes"; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
 	elif test "$(GOBENCH)" != ""; then \
@@ -1119,6 +1125,7 @@ CHECK = \
 	echo "FAIL: $(@D)" > $@-testsum; \
 	exit 1; \
 	  fi; \
+	fi; \
 	fi
 
 


Bug#873929: gcc7: Enable libgo tests and rebuilds with make -C

2017-09-02 Thread Svante Signell
On Sat, 2017-09-02 at 04:07 +0200, Matthias Klose wrote:
> On 01.09.2017 23:11, Svante Signell wrote:
> > On Fri, 2017-09-01 at 13:32 +0200, Matthias Klose wrote:
> > > On 01.09.2017 11:55, Svante Signell wrote:
> > > > Source: gcc-7
> > > > Version: 7.2.0-2
> > > > Severity: important
> > > > Tags: patch
> > > > 
> > > > 
> > > > (The GOBENCH = entry is due to a trailing white space in the
> > > > original
> > > > file)
> > > 
> > > ok, this is the libgo-testsuite.diff patch.  Why do you test
> > > USE_DEJAGNU twice then?
> > 
> > I just found out that the test suite does not run properly, and
> > created the patch making that Makefile snippet being the same as
> > for gcc-6. The if then else fi logic is broken:
> > See e.g. https://buildd.debian.org/status/fetch.php?pkg=gcc-
> > 7&arch=amd64&ver=7.2.0-2&stamp=1504127698&raw=0
> > for failed build logs.
> > 
> > > The go testsuite is special, because it's normally run from every
> > > multilib directory instead of the top libdir only.
> > 
> > Sorry, I don't (yet) know what you mean, but will in due time.
> > Perhaps
> > with your help?
> 
> if you look at the check target for all other target libraries, then
> you'll see that it doesn't descend into the multilib directories,
> e.g. 32 and x32 on amd64, which it does for all target libs besides
> libgo.  Instead the target libraries are iterated what you specifiy
> in RUNTESTFLAGS.  libgo doesn't do that, and descends into the non-
> default multilib dirs itself.  This can be a problem if you don't
> have a kernel running which understands all multilib variants, e.g.
> x32. I'm happy to drop any of these patches, but a test run shouldn't
> try to execute multilib variants when current running kernel doesn't
> support it.

If I understand you correctly the behavior in gcc-6 is correct.
Attached is an updated libgo-testsuite.diff file fixing the if-then-
else-fi logic in the same way as for gcc-6 (including the whitespace
fix). Tested on an amd64 box, and only the 64-bit target is run.

The other patch, libgo-Makefile.diff, adds to the CLEANFILES enabling
libgo rebuilds with make -C ...


Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -1423,7 +1423,9 @@ mostlyclean-local:
 	find . -name '*-testsum' -print | xargs rm -f
 	find . -name '*-testlog' -print | xargs rm -f
 
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
 
 clean-local:
 	find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
Index: gcc-7-7.2.0/src/libgo/Makefile.in
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0/src/libgo/Makefile.in
@@ -1347,7 +1347,10 @@ TEST_PACKAGES = \
 	unicode/utf8/check
 
 MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
+
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
# DP: Only run the libgo testsuite for flags configured in RUNTESTFLAGS

Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -929,7 +929,7 @@ BUILDGOX = \
 	$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
 
 GOTESTFLAGS =
-GOBENCH = 
+GOBENCH =
 
 # Check a package.
 CHECK = \
@@ -948,6 +948,12 @@ CHECK = \
 	$(MKDIR_P) $(@D); \
 	rm -f $@-testsum $@-testlog; \
 	files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \
+	run_check=yes; \
+	MULTILIBDIR="$(MULTILIBDIR)"; \
+	case "$$MULTILIBDIR" in /64|/x32) \
+	  echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
+	esac; \
+	if test "$$run_check" = "yes"; then \
 	if test "$(USE_DEJAGNU)" = "yes"; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTE

Bug#873929: gcc7: Enable libgo tests and rebuilds with make -C

2017-09-01 Thread Svante Signell
On Fri, 2017-09-01 at 13:32 +0200, Matthias Klose wrote:
> On 01.09.2017 11:55, Svante Signell wrote:
> > Source: gcc-7
> > Version: 7.2.0-2
> > Severity: important
> > Tags: patch
> > 
> > Hello,
> > 
> > Currently the libgo tests are not run due to a bug in
> > libgo/Makefile.am
> > (and Makefile.in). This error is found on all architectures where
> > the
> > testsuite is enabled. The attached patch fixes this bug as well as
> > enables rebuilds with
> > make -C build//libgo clean;
> > ;
> > make -C build//libgo;
> > by adding more entries to the CLEANFILES target.
> > 
> > (The GOBENCH = entry is due to a trailing white space in the
> > original
> > file)
> 
> ok, this is the libgo-testsuite.diff patch.  Why do you test
> USE_DEJAGNU twice then?

I just found out that the test suite does not run properly, and created
the patch making that Makefile snippet being the same as for gcc-6. The
if then else fi logic is broken:
See e.g. https://buildd.debian.org/status/fetch.php?pkg=gcc-7&arch=amd6
4&ver=7.2.0-2&stamp=1504127698&raw=0

/usr/bin/make  check-DEJAGNU
make[9]: Entering directory '/<>/build/x86_64-linux-
gnu/32/libgo/testsuite'
srcdir='../../../../../src/libgo/testsuite'; export srcdir; \
EXPECT=`if [ -f ../../expect/expect ] ; then echo ../../expect/expect ;
else echo expect ; fi`; export EXPECT; \
runtest=`if [ -f ../../../../../src/libgo/../dejagnu/runtest ] ; then
echo ../../../../../src/libgo/../dejagnu/runtest ; else echo runtest;
fi`; \
if /bin/bash -c "$runtest --version" > /dev/null 2>&1; then \
  exit_status=0; l='libgo'; for tool in $l; do \
if $runtest "TEST_GCC_EXEC_PREFIX=/usr/lib/gcc" --tool $tool --
srcdir $srcdir --target_board=unix\{,-fstack-protector\}
GOTEST_TMPDIR=gotest21736/test; \
then :; else exit_status=1; fi; \
  done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status

for failed build logs.

> The go testsuite is special, because it's normally run from every
> multilib directory instead of the top libdir only.

Sorry, I don't (yet) know what you mean, but will in due time. Perhaps
with your help?



Bug#873929: gcc7: Enable libgo tests and rebuilds with make -C

2017-09-01 Thread Svante Signell
Source: gcc-7
Version: 7.2.0-2
Severity: important
Tags: patch

Hello,

Currently the libgo tests are not run due to a bug in libgo/Makefile.am
(and Makefile.in). This error is found on all architectures where the
testsuite is enabled. The attached patch fixes this bug as well as
enables rebuilds with
make -C build//libgo clean;
;
make -C build//libgo;
by adding more entries to the CLEANFILES target.

(The GOBENCH = entry is due to a trailing white space in the original
file)

On amd64:

tail build/x86_64-linux-gnu/libgo/libgo.sum
=== libgo Summary ===

# of expected passes145

As a side note many go tests are not run:

tail build/gcc/testsuite/go/go.sum
=== go Summary ===

# of expected passes486
# of untested testcases 834

Looking at build/x86_64-linux-gnu/libgo/libgo.log one finds:
ia3232309.c:2:6: error: size of array 'dummy' is negative
ia3232309.c:4:41: error: '__i386__' undeclared here (not in a
function); did you mean '__k8__'?

However, that problem is the subject of another bug report.

Thanks!Index: gcc-7-7.2.0/src/libgo/Makefile.am
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.am
+++ gcc-7-7.2.0/src/libgo/Makefile.am
@@ -930,7 +930,7 @@ BUILDGOX = \
 	$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
 
 GOTESTFLAGS =
-GOBENCH = 
+GOBENCH =
 
 # Check a package.
 CHECK = \
@@ -955,6 +955,7 @@ CHECK = \
 	  echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
 	esac; \
 	if test "$$run_check" = "yes"; then \
+	if test "$(USE_DEJAGNU)" = "yes"; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
 	elif test "$(GOBENCH)" != ""; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --bench="$(GOBENCH)" $(GOTESTFLAGS); \
@@ -969,6 +970,7 @@ CHECK = \
 	echo "FAIL: $(@D)" > $@-testsum; \
 	exit 1; \
 	  fi; \
+	fi; \
 	fi
 
 # Build all packages before checking any.
@@ -1421,7 +1423,9 @@ mostlyclean-local:
 	find . -name '*-testsum' -print | xargs rm -f
 	find . -name '*-testlog' -print | xargs rm -f
 
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
 
 clean-local:
 	find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
Index: gcc-7-7.2.0/src/libgo/Makefile.in
===
--- gcc-7-7.2.0.orig/src/libgo/Makefile.in
+++ gcc-7-7.2.0/src/libgo/Makefile.in
@@ -,6 +,7 @@ CHECK = \
 	  echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
 	esac; \
 	if test "$$run_check" = "yes"; then \
+	if test "$(USE_DEJAGNU)" = "yes"; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
 	elif test "$(GOBENCH)" != ""; then \
 	  $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --bench="$(GOBENCH)" $(GOTESTFLAGS); \
@@ -1125,6 +1126,7 @@ CHECK = \
 	echo "FAIL: $(@D)" > $@-testsum; \
 	exit 1; \
 	  fi; \
+	fi; \
 	fi
 
 
@@ -1345,7 +1347,10 @@ TEST_PACKAGES = \
 	unicode/utf8/check
 
 MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log \
+	*.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \
+	*/*/*/*/*/*.dep
+
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 


Bug#856274: removal of ada-gcc-name patch causes build failures for non default gnat builds

2017-02-27 Thread Svante Signell
On Mon, 2017-02-27 at 12:27 +0100, Matthias Klose wrote:
> Package: gnat-5,gnat-6,gnat-7
> Severity: important
> X-Debbugs-CC: Svante Signell 
> 
> The recent gcc-5 upload with the ada-gcc-name patch removed results in build
> failures, because gnatmake now calls /usr/bin/gcc (which points to gcc-6), and
> doesn't find an installed gnat1 binary [1]. So I think that the workaround
> from
> #814978 only works for the default gnat version, and we should properly fix
> this
> issue.  Just adding gnat-6 as a build dependency won't help, because we cannot
> assume that a newer gnat is able to build an older gnat.
> 
> So we need to investigate where the doubled suffix comes from.

Agreed. Just two observations:

1) In ada-acats.diff the gcc version should be gcc-5 not gcc-6:
-+echo exec /usr/bin/gnatchop --GCC=gcc-6 '$*' >> host_gnatchop
++echo exec /usr/bin/gnatchop --GCC=gcc-5 '$*' >> host_gnatchop

2) Why do the compiler driver call gcc instead of gcc-?
(This is probably here the ada-gcc-name.diff comes into play)
gnatmake -v xnmake
GNATMAKE 5.4.1
Copyright (C) 1992-2015, Free Software Foundation, Inc.
  "xnmake.ali" being checked ...
  -> "xnmake.ali" missing.
gcc -c xnmake.adb
gcc: error trying to exec 'gnat1': execvp: No such file or directory
End of compilation
gnatmake: "xnmake.adb" compilation error

ls -l /usr/bin/gnatmake
lrwxrwxrwx 1 root root 10 Feb  5 22:06 /usr/bin/gnatmake -> gnatmake-5

gnatmake-5 -v xnmake




Update bug 814978 to: found in gcc-6 and severity serious

2017-01-27 Thread Svante Signell
severity 814978 serious
found 814978 6.3.0-5
tags 814978 patch
usertags gnat-6
thanks

Hi,

Looking into the problems with the acats tests not being run reveals problems
with the ada-gcc-name.diff and ada-acats.diff patches.
Adding gcc-6 to the files in ada-gcc-name.diff makes the functions
Locate_Executable in gnatchop.adb and Program_Name called in gnatlink.adb and
gnatmake(make.adb) confused and adds -6 to the full program names, e.g. for
Linux amd64:
x86_64-linux-gnu-gnatchop-6
x86_64-linux-gnu-gnatlink-6
x86_64-linux-gnu-gnatmake-6
causing these to not be found. The first does also disables the acats testsuite.
One solution is to remove the ada-gcc-name.diff patch, and (temporarily) add --
GCC=gcc-6 to the execution of the run_acats script since already installed
versions all carry this bug. Of course modifying the Ada functions would also be
a solution.

The program name problems are easily shown as:
gnatchop:
Via path: OK
gnatchop macrosub.ada
Direct nOK:
/usr/bin/gnatchop macrosub.ada
x86_64-linux-gnu-gcc-6-6: installation problem, executable not found

gnatlink:
Via path: OK
gnatlink macrosub.ali
Direct: OK
/usr/bin/gnatlink macrosub.ali
/usr/bin/x86_64-linux-gnu-gnatlink macrosub.ali
Direct with full name: nOK
/usr/bin/x86_64-linux-gnu-gnatlink-6 macrosub.ali
x86_64-linux-gnu-gnatlink-6: Couldn't locate x86_64-linux-gnu-gcc-6-6

gnatmake:
OK:
gnatmake, gnatmake-6 macrosub.ali
/usr/bin/x86_64-linux-gnu-gnatmake ../test/macrosub.adb
nOK:
/usr/bin/x86_64-linux-gnu-gnatmake-6 ../test/macrosub.adb
x86_64-linux-gnu-gcc-6-6 -c -I../test/ -I- ../test/macrosub.adb
x86_64-linux-gnu-gnatmake-6: error, unable to locate x86_64-linux-gnu-gcc-6-6

Note:
The ada-gcc-name.diff patch also patches three other files:
prj-makr.adb, mlib-utl.adb linked into libgnatprj.so.0.6
mlic-utl.adb: Not compiled.
Maybe they are still needed. This has not been investigated yet.

The second part of the patch includes editing out a blank and a carriage return
when setting the environment variable target_bit [32,64], see below.

The patch changes are summarized below:
1) debian/patches/series: comment out debian/patches/ada-gcc-name.diff
2) Updated patch: debian/patches/ada-acats.diff
diff -u ada-acats.diff.orig ada-acats.diff

gcc-6-6.3.0/src/gcc/testsuite/ada/acats/run_acats
-+echo exec /usr/bin/gnatchop '$*' >> host_gnatchop
++echo exec /usr/bin/gnatchop --GCC=gcc-6 '$*' >> host_gnatchop

gcc-6-6.3.0/src/gcc/testsuite/ada/acats/run_all.sh
-target_bit=`cat $dir/support/impbit.out`
-+target_bit=`cat $dir/support/impbit.out` | sed -e 's/\r//g'
++target_bit=`cat $dir/support/impbit.out | sed -e 's/ //g' -e 's/\r//g'`

Thanks!# DP: - When running the ACATS, look for the gnat tools in their new
# DP:   directory (build/gnattools), and for the shared libraries in
# DP:   build/gcc/ada/rts, build/libgnatvsn and build/libgnatprj.

Index: gcc-6-6.3.0/src/gcc/testsuite/ada/acats/run_acats
===
--- gcc-6-6.3.0.orig/src/gcc/testsuite/ada/acats/run_acats
+++ gcc-6-6.3.0/src/gcc/testsuite/ada/acats/run_acats
@@ -20,52 +20,30 @@ which () {
 return 1
 }
 
+echo '#!/bin/sh' > host_gnatchop
+echo exec /usr/bin/gnatchop --GCC=gcc-6 '$*' >> host_gnatchop
+
+chmod +x host_gnatchop
+
+echo '#!/bin/sh' > host_gnatmake
+echo echo '$PATH' '$*' >> host_gnatmake
+echo exec /usr/bin/gnatmake '$*' >> host_gnatmake
+
+chmod +x host_gnatmake
+
 # Set up environment to use the Ada compiler from the object tree
 
-host_gnatchop=`which gnatchop`
-host_gnatmake=`which gnatmake`
 ROOT=`${PWDCMD-pwd}`
 BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
-
 PATH=$BASE:$ROOT:$PATH
-ADA_INCLUDE_PATH=$BASE/ada/rts
-LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$BASE:$LD_LIBRARY_PATH
-ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH
-
-if [ ! -d $ADA_INCLUDE_PATH ]; then
-   echo gnatlib missing, exiting.
-   exit 1
-fi
-
-if [ ! -f $BASE/gnatchop ]; then
-   echo gnattools missing, exiting.
-   exit 1
-fi
-
-if [ ! -f $BASE/gnatmake ]; then
-   echo gnattools missing, exiting.
-   exit 1
-fi
-
 GCC_DRIVER="$BASE/xgcc"
+TARGET=`${GCC_DRIVER} -v  2>&1 |grep '^Target:' | cut -d' ' -f2`
+GNATTOOLS=`cd $BASE/../gnattools; ${PWDCMD-pwd}`
+LIBGNATVSN=`cd $BASE/../${TARGET}/libgnatvsn; ${PWDCMD-pwd}`
+LIBGNATPRJ=`cd $BASE/../${TARGET}/libgnatprj; ${PWDCMD-pwd}`
 GCC="$BASE/xgcc -B$BASE/"
 export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC LD_LIBRARY_PATH
-
-echo '#!/bin/sh' > host_gnatchop
-echo PATH=`dirname $host_gnatchop`:'$PATH' >> host_gnatchop
-echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatchop
-echo export PATH >> host_gnatchop
-echo exec gnatchop '"$@"' >> host_gnatchop
-
-chmod +x host_gnatchop
-
-echo '#!/bin/sh' > host_gnatmake
-echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake
-echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatmake
-echo export PATH >> host_gnatmake
-echo exec gnatmake '"$@"' >> host_gnatmake
-
-chmod +x host_gnatmake
+export GNATTOOLS LIBGNATVSN LIBGNA

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Wed, 2016-12-07 at 17:25 +0100, Samuel Thibault wrote:
> Svante Signell, on Wed 07 Dec 2016 15:32:31 +0100, wrote:
> > On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote:
> > > Ok, but then I'd say move the function which change to a separate file,
> > > so that the other functions are kept shared.
> > > Otherwise it'll be tedious to maintain.
> > 
> > One problem is the file go/syscall/libcall_posix-1.go, derived
> > from go/syscall/libcall_posix.go but _removing_ four function definitions:
> > mount, madvise, mlockall and munlockall.
> 
> That's not a problem: move them out to another file, and include that
> file in the non-gnu case, but do not include that file in the gnu case.
> 
> Actually it's even odd to see mount among them, it's not a standard
> posix interface.

I'm sorry but neither of you or I are in the position to request changes of
already existing file names e.g. replacing linux with glibc in:
os/pipe_linux.go
crypto/x509/root_linux.go
syscall/errstr_linux.go

Neither are we in the position to request to rename libcall_posix.go to
something else, or move the four functions definitions mount, mlocall,
munlockall, madvise, mentioned above to a separate file.

So far, nobody, upstream or debian-gcc, have made any comment on the patches
whatsoever. So what are we doing? Let's forget about porting gccgo to GNU/Hurd.

Thanks!



Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote:
> Svante Signell, on Wed 07 Dec 2016 14:52:35 +0100, wrote:
> > Since go does not have a preprocessor allowing conditional code paths this
> > is
> > how it should be done (and as I did):
> > http://blog.ralch.com/tutorial/golang-conditional-compilation/
> 
> Ok, but then I'd say move the function which change to a separate file,
> so that the other functions are kept shared.
> Otherwise it'll be tedious to maintain.

One problem is the file go/syscall/libcall_posix-1.go, derived
from go/syscall/libcall_posix.go but _removing_ four function definitions:
mount, madvise, mlockall and munlockall. A possible solution would then be to
rename that file to libcall_posix_gnu.go. The file libcall_gnu.go name is
already used.



Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Sun, 2016-11-27 at 18:02 +0100, Samuel Thibault wrote:
> Hello,
> 
> Svante Signell, on Sun 27 Nov 2016 17:33:52 +0100, wrote:
> > > > 
> > > And
> > > src_libgo_go_syscall_syscall_gnu_test.go: New file:
> > >   Define Type and Whence as 32bit in syscall.Flock_t
> > > 
> > > Again, you'll probably have to discuss with upstream to see how they
> > > prefer to make it configurable rather than forking the whole file.
> > > 

I found the answer, see below!

> > I tried to patch the syscall_unix_test.go file, but did not succeed. 
> > Definitely if runtime.GOOS == "GNU" ... else ... or switch runtime.GOOS
> > ... does not work. The compiler sees all code and complains, also the
> > else part of the code :( Therefore I created a new file.
> 
> Then ask upstream how they think it can and should be done.
> 

Since go does not have a preprocessor allowing conditional code paths this is
how it should be done (and as I did):
http://blog.ralch.com/tutorial/golang-conditional-compilation/

Verdict
===
We should aim to develop and build our Go applications by following Go idioms.
If the source file targets a specific platform, we should choose file suffix
approach. Otherwise, if the source file is applicable for multiple platforms and
we want to exclude a specific feature or platform, we should use build
constraints instead.

Build constraints
=
A build constraints (known as build tags) is an optional top line comment that
starts with

// +build

package api

File suffixes
=
The second option for conditional compilation is the name of the
source file itself. This approach is simpler than build tags, and allows
the Go build system to exclude files without having to process the file.

We should add one of the following suffixes to desired files:

*_GOOS // operation system
*_GOARCH // platform architecture
*_GOOS_GOARCH // both combined



Re: Hurd port for gcc go PATCH 1-4(23)

2016-11-27 Thread Svante Signell
On Sun, 2016-11-27 at 18:02 +0100, Samuel Thibault wrote:
> Hello,
...
> > But as you wish, an updated patch is attached.
> 
>  _Bool
>  Continued (uint32_t *w)
>  {
> +#ifndef WCONTINUED
> +  *w = 0;
> +  return 0;
> +#else
>    return WIFCONTINUED (*w) != 0;
> +#endif
>  }
> 
> Err, recheck the semantic of WCONTINUED again, it doesn't modify its
> parameter, it just tests its value.
> 
> Do as I said, just return 0.
> 

No I can't the compiler complains about an unused variable. Maybe
adding an __attribute__((unused)) to the function header?

...

> 
> > This is for upstream to decide.
> 
> I'm just afraid they'd just frown on the code submission and not take
> the time to explain how they want it to look like if we don't raise
> the
> discussion ourselves.
> 

Should we propose these changes upstream? Or do you mean something
else? 

> > > And
> > > src_libgo_go_syscall_syscall_gnu_test.go: New file:
> > >   Define Type and Whence as 32bit in syscall.Flock_t
> > > 
> > > Again, you'll probably have to discuss with upstream to see how
> > > they
> > > prefer to make it configurable rather than forking the whole
> > > file.
> > > 
> > 
> > I tried to patch the syscall_unix_test.go file, but did not
> > succeed. 
> > Definitely if runtime.GOOS == "GNU" ... else ... or switch
> > runtime.GOOS
> > ... does not work. The compiler sees all code and complains, also
> > the
> > else part of the code :( Therefore I created a new file.
> 
> Then ask upstream how they think it can and should be done.
> 

Upstream would be Ian Lance Taylor, right?

> > > > -CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum
> > > > libgo.log
> > > > +CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log
> > > 
> > > This seems unrelated?
> > > 
> > No, this is not unrelated: With this patch you can
> > make -C build/i686-gnu/libgo clean
> > make -C build/i686-gnu/libgo
> > to rebuild libgo. Otherwise libcalls.go is not regenerated,
> > mksysinfo.sh is not run etc. 
> 
> That's still unrelated to the matter here: porting go to
> GNU/Hurd.  It
> looks like a bug fix which is completely independant from GNU/Hurd.

Yes it is not Hurd-related. Maybe this should be filed as a separate
bug. To gcc upstream directly?

> > > 
> > > 
> > > We could rather just implement the comm field in ps, AIUI it's
> > > just an alias for the command field.
> > 
> > Your choice. When implemented this patch wouldn't bee needed.
> 
> Then please do implement it :)

Sorry, I need help for doing this. Any other Hurd developer listening?

Thanks for reviewing :) Nice to see that anybody cares.



Re: Hurd port for gcc go PATCH 1-4(23)

2016-11-27 Thread Svante Signell
On Sun, 2016-11-27 at 00:17 +0100, Samuel Thibault wrote:
> Hello,
> 
> Nice work!

Thanks :)

> Mmm, why making changes in each file in a separate patch?  I don't
> think
> it makes things easier to review, I'd say rather send a big patch,
> it's
> altogether that it makes sense anyway.

It's just for convenience of handling. It's a simple matter to collapse
them all into one patch.
 
> > Index: gcc-6-6.2.1-4.1/src/libgo/Makefile.in
> > ===
> > --- gcc-6-6.2.1-4.1.orig/src/libgo/Makefile.in
> > +++ gcc-6-6.2.1-4.1/src/libgo/Makefile.in
> 
> Makefile.in is a generated file!  Send the patch against Makefile.am
> instead.  I hope you didn't modify Makefile.in by hand?!

Of course not. The comment said: Update accordingly with
autoreconf2.64. Additionally, automake1.11 has to be installed, and no
newer automake version can be installed to regenerate that file after a
change in Makefile.am. The build system is unfortunately based on these
old auto-tools. A change to later versions of automake and autoconf
would be preferred. However, this is an effort (probably not trivial)
that has to be made upstream for the whole gcc-* development.

> Svante Signell, on Fri 25 Nov 2016 20:59:27 +0100, wrote:
> > Index: gcc-6-6.2.1-4.1/src/libgo/go/syscall/wait.c
> > ===
> > --- gcc-6-6.2.1-4.1.orig/src/libgo/go/syscall/wait.c
> > +++ gcc-6-6.2.1-4.1/src/libgo/go/syscall/wait.c
> > @@ -8,6 +8,9 @@
> > OS-independent.  */
> >  
> >  #include 
> > +#ifndef WCONTINUED
> > +#define WCONTINUED 0
> > +#endif
> >  #include 
> >  
> >  #include "runtime.h"
> 
> That looks odd at best: WCONTINUED can't be defined at this place
> anyway, so it'll get defined to 0. Fortunately the sys/wait.h
> definition
> would override this. But then wait.c will define something which does
> not make sense since WCONTINUED is not implemented. Better use #ifdef
> WCONTINUED inside the Continued function, to always return 0 when
> it's
> not defined.
> 

I've been implementing that version too, with no visible differences.
But as you wish, an updated patch is attached.

> > @@ -744,6 +752,14 @@ go_net_sockoptip_file = go/net/sockoptip
> >  go_net_cgo_sock_file = go/net/cgo_sockold.go
> >  go_net_cgo_res_file = go/net/cgo_resnew.go
> >  else
> > +if LIBGO_IS_GNU
> > +go_net_cgo_file = go/net/cgo_linux.go
> 
> I'd say rather rename to cgo_glibc.go . The getaddrinfo
> implementation
> is simply exactly the same between linux, GNU/Hurd, kFreeBSD etc.,
> there
> is nothing Linux-specific here.
> 
> There are quite a few other files which could be renamed to glibc:
> 
> os/pipe_linux.go
> crypto/x509/root_linux.go
> syscall/errstr_linux.go
> 

That's for upstream to decide.

> > @@ -768,11 +785,15 @@ else
> >  if LIBGO_IS_SOLARIS
> >  go_net_sendfile_file = go/net/sendfile_solaris.go
> >  else
> > +if LIBGO_IS_GNU
> > +go_net_sendfile_file = go/net/sendfile_gnu.go
> > +else
> >  go_net_sendfile_file = go/net/sendfile_stub.go
> >  endif
> 
> There is no difference with the Linux version... I'd say rather
> propose
> to rename sendfile_linux.go into sendfile_glibc.go and just use that.
> 

See above about naming. I'll remove the go/net/sendfile_gnu.go file
from the patches.

> > +go_net_sock_file = go/net/sock_gnu.go
> 
> > Index: gcc-6-6.2.1-4.1/src/libgo/go/net/sock_gnu.go
> > ===
> > --- /dev/null
> > +++ gcc-6-6.2.1-4.1/src/libgo/go/net/sock_gnu.go
> > @@ -0,0 +1,14 @@
> > +// Copyright 2014 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 gnu
> > +
> > +package net
> > +
> > +import "syscall"
> > +
> > +func maxListenerBacklog() int {
> > +   // From /usr/include/i386-gnu/bits/socket.h
> > +   return syscall.SOMAXCONN
> > +}
> 
> Why not just using sock_stub.go which is the same?
> 

Sorry, I thought I had removed duplicates. New Makefile.am,in and
debian_rules.patch patches will be attached in a subsequent mail.

> > @@ -2028,11 +2093,20 @@ else
> >  syscall_os_file = go/syscall/libcall_bsd.go
> >  endif
> >  
> > +# GNU/Hurd specific library calls support.
> > +if LIBGO_IS_GNU
> > +syscall_libcall_file = go/syscall/libcall_posix-1.go
> > +syscall_os_te

Hurd port for gcc go PATCH 19-23(23)

2016-11-25 Thread Svante Signell
* src_libgo_runtime_netpoll.goc.diff: Fix restricted word bug.
  Rename variable errno to errno1.
* src_libgo_go_os_os_test.go.diff: Allow EFBIG return code to big
seeks.
* src_libgo_go_syscall_syscall_gnu_test.go: New file:
  Define Type and Whence as 32bit in syscall.Flock_t
* src_libgo_testsuite_gotest.diff: Remove comm option for ps -o.
* add-gnu-to-libgo-headers.diff:
  Add gnu to +build entry in file headers included in the build.
  FIXME:  Index: gcc-6-6.2.1-4.1/src/libgo/go/archive/tar/stat_atim.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/archive/tar/stat_atim.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/archive/tar/stat_atim.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 linux dragonfly openbsd solaris
+// +build linux dragonfly openbsd solaris gnu
 
 package tar
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/cgo_resnew.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/cgo_resnew.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/cgo_resnew.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build cgo,!netgo
-// +build darwin linux,!android netbsd solaris
+// +build darwin linux,!android netbsd solaris gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/cgo_socknew.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/cgo_socknew.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/cgo_socknew.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build cgo,!netgo
-// +build android linux solaris
+// +build android linux solaris gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/hook_cloexec.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/hook_cloexec.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/hook_cloexec.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 freebsd linux
+// +build freebsd linux gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/main_unix_test.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/main_unix_test.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/main_unix_test.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 darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/sock_cloexec.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/sock_cloexec.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/sock_cloexec.go
@@ -5,7 +5,7 @@
 // This file implements sysSocket and accept for platforms that
 // provide a fast path for setting SetNonblock and CloseOnExec.
 
-// +build freebsd linux
+// +build freebsd linux gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/sockoptip_posix.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/net/sockoptip_posix.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/sockoptip_posix.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 darwin dragonfly freebsd linux netbsd openbsd windows
+// +build darwin dragonfly freebsd linux netbsd openbsd windows gnu
 
 package net
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/syscall/exec_unix.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/syscall/exec_unix.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/syscall/exec_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 darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris gnu
 
 // Fork, exec, wait, etc.
 
Index: gcc-6-6.2.1-4.1/src/libgo/runtime/netpoll_select.c
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/runtime/netpoll_select.c
+++ gcc-6-6.2.1-4.1/src/libgo/runtime/netpoll_select.c
@@ -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 solaris
+// +build solaris gnu
 
 #include "config.h"
 
Index: gcc-6-6.2.1-4.1/src/libgo/go/os/exec/lp_unix.go
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/os/exec/lp_unix.go
+++ gcc-6-6.2.1-4.1/src/libgo/go/os/exec/lp_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found

Hurd port for gcc go PATCH 11-18(23)

2016-11-25 Thread Svante Signell
* src_libgo_go_net_sendfile_gnu.go.diff: New file
* src_libgo_go_net_sock_gnu.go.diff: New file
* src_libgo_go_net_sockopt_gnu.go.diff: New file
* src_libgo_go_net_sockoptip_gnu.go.diff: New file
* src_libgo_go_syscall_libcall_gnu_386.go.diff: New file
* src_libgo_go_syscall_libcall_gnu.go.diff: New file
* src_libgo_go_syscall_libcall_posix-1.go.diff: New file derived from
libcall_posix.go
  Removed the mount call for GNU/Hurd, it exists but use translators.
  Removed the mlockall/munlockall calls for GNU/Hurd, not yet
implemented.
  Removed the madvise call for GNU/Hurd, not yet implemented.
* src_libgo_go_syscall_socket_gnu.go.diff: New fileIndex: gcc-6-6.2.1-4.1/src/libgo/go/net/sendfile_gnu.go
===
--- /dev/null
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/sendfile_gnu.go
@@ -0,0 +1,79 @@
+// Copyright 2011 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.
+
+package net
+
+import (
+	"io"
+	"os"
+	"syscall"
+)
+
+// maxSendfileSize is the largest chunk size we ask the kernel to copy
+// at a time.
+const maxSendfileSize int = 4 << 20
+
+// sendFile copies the contents of r to c using the sendfile
+// system call to minimize copies.
+//
+// if handled == true, sendFile returns the number of bytes copied and any
+// non-EOF error.
+//
+// if handled == false, sendFile performed no work.
+func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
+	var remain int64 = 1 << 62 // by default, copy until EOF
+
+	lr, ok := r.(*io.LimitedReader)
+	if ok {
+		remain, r = lr.N, lr.R
+		if remain <= 0 {
+			return 0, nil, true
+		}
+	}
+	f, ok := r.(*os.File)
+	if !ok {
+		return 0, nil, false
+	}
+
+	if err := c.writeLock(); err != nil {
+		return 0, err, true
+	}
+	defer c.writeUnlock()
+
+	dst := c.sysfd
+	src := int(f.Fd())
+	for remain > 0 {
+		n := maxSendfileSize
+		if int64(n) > remain {
+			n = int(remain)
+		}
+		n, err1 := syscall.Sendfile(dst, src, nil, n)
+		if n > 0 {
+			written += int64(n)
+			remain -= int64(n)
+		}
+		if n == 0 && err1 == nil {
+			break
+		}
+		if err1 == syscall.EAGAIN {
+			if err1 = c.pd.WaitWrite(); err1 == nil {
+continue
+			}
+		}
+		if err1 != nil {
+			// This includes syscall.ENOSYS (no kernel
+			// support) and syscall.EINVAL (fd types which
+			// don't implement sendfile)
+			err = err1
+			break
+		}
+	}
+	if lr != nil {
+		lr.N = remain
+	}
+	if err != nil {
+		err = os.NewSyscallError("sendfile", err)
+	}
+	return written, err, written > 0
+}
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/sock_gnu.go
===
--- /dev/null
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/sock_gnu.go
@@ -0,0 +1,14 @@
+// Copyright 2014 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 gnu
+
+package net
+
+import "syscall"
+
+func maxListenerBacklog() int {
+   // From /usr/include/i386-gnu/bits/socket.h
+   return syscall.SOMAXCONN
+}
Index: gcc-6-6.2.1-4.1/src/libgo/go/net/sockopt_gnu.go
===
--- /dev/null
+++ gcc-6-6.2.1-4.1/src/libgo/go/net/sockopt_gnu.go
@@ -0,0 +1,45 @@
+// Copyright 2011 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 gnu
+
+package net
+
+import (
+	"os"
+	"syscall"
+)
+
+func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
+	if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
+		// Allow both IP versions even if the OS default
+		// is otherwise.  Note that some operating systems
+		// never admit this option.
+		syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
+	}
+	// Allow broadcast.
+	return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1))
+}
+
+func setDefaultListenerSockopts(s int) error {
+	// Allow reuse of recently-used addresses.
+	return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1))
+}
+
+func setDefaultMulticastSockopts(s int) error {
+	// Allow multicast UDP and raw IP datagram sockets to listen
+	// concurrently across multiple listeners.
+	if err := syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1); err != nil {
+		return os.NewSyscallError("setsockopt", err)
+	}
+	// Allow reuse of recently-used ports.
+	// This option is supported only in descendants of 4.4BSD,
+	// to make an effective multicast application that requires
+	// quick draw possible.
+	// Not supported on GNU/Hurd
+	//if syscall.SO_REUSEPORT != 0 {
+	//	return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_REUSEPORT, 1))
+	//}
+	return nil
+}
Ind

Hurd port for gcc go PATCH 5-10(23)

2016-11-25 Thread Svante Signell
* src_libgo_configure.ac.diff: Define GOOS=gnu and LIBGO_IS_GNU
* src_libgo_Makefile.am.diff: Add support for GNU/Hurd.
* src_libgo_Makefile.in.diff: Update accordingly with autreconf2.64
* src_libgo_mksysinfo.sh.diff: Define SYS_IOCTL to 0 if not defined,
 Fix: #define EWOULDBLOCK EAGAIN in 
 Fix: #define st_dev st_fsid in Index: gcc-6-6.2.1-4.1/src/libgo/configure.ac
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/configure.ac
+++ gcc-6-6.2.1-4.1/src/libgo/configure.ac
@@ -151,6 +151,7 @@ is_openbsd=no
 is_dragonfly=no
 is_rtems=no
 is_solaris=no
+is_gnu=no
 GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
@@ -162,6 +163,7 @@ case ${host} in
   *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
   *-*-rtems*)is_rtems=yes;   GOOS=rtems ;;
   *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
+  *-*-gnu*)  is_gnu=yes; GOOS=gnu ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
@@ -172,6 +174,7 @@ AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $i
 AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
+AM_CONDITIONAL(LIBGO_IS_GNU, test $is_gnu = yes)
 AC_SUBST(GOOS)
 
 dnl Test whether we need to use DejaGNU or whether we can use the
Index: gcc-6-6.2.1-4.1/src/libgo/go/syscall/wait.c
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/go/syscall/wait.c
+++ gcc-6-6.2.1-4.1/src/libgo/go/syscall/wait.c
@@ -8,6 +8,9 @@
OS-independent.  */
 
 #include 
+#ifndef WCONTINUED
+#define WCONTINUED 0
+#endif
 #include 
 
 #include "runtime.h"
Index: gcc-6-6.2.1-4.1/src/libgo/Makefile.am
===
--- gcc-6-6.2.1-4.1.orig/src/libgo/Makefile.am
+++ gcc-6-6.2.1-4.1/src/libgo/Makefile.am
@@ -419,6 +419,9 @@ else
 if LIBGO_IS_NETBSD
 runtime_getncpu_file = runtime/getncpu-bsd.c
 else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
 runtime_getncpu_file = runtime/getncpu-none.c
 endif
 endif
@@ -426,6 +429,7 @@ endif
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_LINUX
 runtime_netpoll_files = runtime/netpoll_epoll.c
@@ -433,9 +437,13 @@ else
 if LIBGO_IS_SOLARIS
 runtime_netpoll_files = runtime/netpoll_select.c
 else
+if LIBGO_IS_GNU
+runtime_netpoll_files = runtime/netpoll_select.c
+else
 runtime_netpoll_files = runtime/netpoll_kqueue.c
 endif
 endif
+endif
 
 runtime_files = \
 	runtime/go-append.c \
@@ -744,6 +752,14 @@ go_net_sockoptip_file = go/net/sockoptip
 go_net_cgo_sock_file = go/net/cgo_sockold.go
 go_net_cgo_res_file = go/net/cgo_resnew.go
 else
+if LIBGO_IS_GNU
+go_net_cgo_file = go/net/cgo_linux.go
+go_net_sock_file = go/net/sock_gnu.go
+go_net_sockopt_file = go/net/sockopt_gnu.go
+go_net_sockoptip_file = go/net/sockoptip_gnu.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_socknew.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
+else
 go_net_cgo_file = go/net/cgo_bsd.go
 go_net_sock_file = go/net/sock_bsd.go
 go_net_sockopt_file = go/net/sockopt_bsd.go
@@ -755,6 +771,7 @@ endif
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_LINUX
 go_net_sendfile_file = go/net/sendfile_linux.go
@@ -768,11 +785,15 @@ else
 if LIBGO_IS_SOLARIS
 go_net_sendfile_file = go/net/sendfile_solaris.go
 else
+if LIBGO_IS_GNU
+go_net_sendfile_file = go/net/sendfile_gnu.go
+else
 go_net_sendfile_file = go/net/sendfile_stub.go
 endif
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_LINUX
 go_net_interface_file = go/net/interface_linux.go
@@ -794,9 +815,13 @@ else
 if LIBGO_IS_FREEBSD
 go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
 else
+if LIBGO_IS_GNU
+go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
+else
 go_net_cloexec_file = go/net/sys_cloexec.go
 endif
 endif
+endif
 
 if LIBGO_IS_OPENBSD
 go_net_tcpsockopt_file = go/net/tcpsockopt_openbsd.go
@@ -889,9 +914,13 @@ else
 if LIBGO_IS_LINUX
 go_os_dir_file = go/os/dir_largefile.go
 else
+if LIBGO_IS_GNU
+go_os_dir_file = go/os/dir_largefile.go
+else
 go_os_dir_file = go/os/dir_regfile.go
 endif
 endif
+endif
 
 if LIBGO_IS_DARWIN
 go_os_getwd_file = go/os/getwd_darwin.go
@@ -911,11 +940,15 @@ else
 if LIBGO_IS_RTEMS
 go_os_sys_file = go/os/sys_uname.go
 else
+if LIBGO_IS_GNU
+go_os_sys_file = go/os/sys_uname.go
+else
 go_os_sys_file = go/os/sys_bsd.go
 endif
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_FREEBSD
 go_os_cloexec_file = go/os/sys_freebsd.go
@@ -937,6 +970,9 @@ else
 if LIBGO_IS_LINUX
 go_os_stat_file = go/os/stat_atim.go
 else
+if LIBGO_IS_GNU
+go_os_stat_file = go/os/stat_atim.go
+else
 if LIBGO_IS_OPENBSD
 go_os_stat_file = go/os/stat_atim.go
 else
@@ -960,12 +996,17 @@ endif
 endif
 endif
 endif
+endif
 
 if LIBGO_IS_LINUX
 go_os_pipe_file = go/os/pipe_linux.go
 else
+if LIBGO_IS_GNU
+go_os_pipe_file = go/os/pipe_linux.go
+else
 go_o

Hurd port for gcc go PATCH 1-4(23)

2016-11-25 Thread Svante Signell
Hi,

Attached are patches to enable gccgo to build properly on Debian
GNU/Hurd on gcc-6 (6-6.2.1-5).

The first three patches are Debian-specific:

* debian_rules.defs.diff: Enables build of gccgo for GNU/Hurd

Define patches for the generated series file:
* debian_rules.patch.diff:  Enables split-stack support.
* debian_rules.patch.diff:  Does not enable split-stack support.

* src_gcc_config_i386_gnu.h.diff: Enable split-stack support

The test suite results are as follows:
Without split-stack support:
              === go Summary ===
# of expected passes7359
# of unexpected failures7
# of expected failures  1
# of untested testcases 10
# of unsupported tests  2
                === libgo Summary ===
# of expected passes121
# of unexpected failures13

With split-stack support:

                === go Summary ===
# of expected passes7366
# of unexpected failures8
# of expected failures  1
# of untested testcases 6
# of unsupported tests  2
                === libgo Summary ===
# of expected passes120
# of unexpected failures14

All failing go tests and more than half of the libgo tests are runtime
errors due to exception handling not working as expected:
Aborted
runtime_sighandler ...
fatal error: unexpected signal during runtime execution
panic: runtime error: invalid memory address or nil pointer dereference

The above problems are probably due to some remaining issues in
gnumach/hurd/glibc to be solved. According to Samuel Thibault these
problems can be handled late when the patches are accepted upstream or
in Debian gcc. Another more annoying gnumch/hurd/glibc bug is that the
built program go (go-6 in Debian) gets killed when executed from the
shell vi path, but not when issued directly: /usr/bin/go-6 works fine.
 go-6
Segmentation fault (core dumped)
gdb /usr/bin/go-6 -c ./core
warning: Unexpected size of section `.reg2/16883' in core file.
Core was generated by `go-6'.
Program terminated with signal SIGSEGV, Segmentation fault.

warning: Unexpected size of section `.reg2/16883' in core file.
#0  0x01e854ae in ?? ()
(gdb) bt
#0  0x01e854ae in ?? ()
#1  0x in ?? ()

Nevertheless, it seems like not so much is left for gccgo working
properly on GNU/Hurd.

Thanks!

--- a/debian/rules.defs	2014-01-07 11:10:44.0 +0100
+++ b/debian/rules.defs	2014-01-07 11:23:47.0 +0100
@@ -933,7 +933,7 @@
 ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric))
   go_no_cpus := $(filter-out arm, $(go_no_cpus))
 endif
-go_no_systems := gnu kfreebsd-gnu
+go_no_systems := kfreebsd
 
 ifneq ($(with_base_only),yes)
   ifneq ($(separate_lang),yes)
@@ -943,7 +943,7 @@
 ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(go_no_cpus)))
   with_go := disabled for cpu $(DEB_TARGET_ARCH_CPU)
 endif
-ifneq (,$(findstring $(DEB_TARGET_GNU_SYSTEM),$(go_no_systems)))
+ifneq (,$(findstring $(DEB_TARGET_ARCH_OS),$(go_no_systems)))
   with_go := disabled for system $(DEB_TARGET_GNU_SYSTEM)
 endif
 ifeq ($(go_no_cross)-$(DEB_CROSS),yes-yes)
--- a/debian/rules.patch.orig	2016-11-12 16:50:46.0 +0100
+++ b/debian/rules.patch	2016-11-12 16:55:24.0 +0100
@@ -276,6 +276,27 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += \
+ src_gcc_config_i386_gnu.h \
+ src_libgo_configure.ac \
+ src_libgo_go_net_sendfile_gnu.go \
+ src_libgo_go_net_sock_gnu.go \
+ src_libgo_go_net_sockopt_gnu.go \
+ src_libgo_go_net_sockoptip_gnu.go \
+ src_libgo_go_syscall_libcall_gnu_386.go \
+ src_libgo_go_syscall_libcall_gnu.go \
+ src_libgo_go_syscall_libcall_posix-1.go \
+ src_libgo_go_syscall_socket_gnu.go \
+ src_libgo_go_syscall_wait.c \
+ src_libgo_Makefile.am \
+ src_libgo_Makefile.in \
+ src_libgo_mksysinfo.sh \
+ src_libgo_runtime_getncpu-gnu.c \
+ src_libgo_runtime_netpoll.goc \
+		  src_libgo_go_os_os_test.go \
+ src_libgo_go_syscall_syscall_gnu_test.go \
+ src_libgo_testsuite_gotest \
+		  add-gnu-to-libgo-headers
 endif
 
 debian_patches += gcc-ice-dump
--- a/debian/rules.patch.orig	2016-11-12 16:50:46.0 +0100
+++ b/debian/rules.patch	2016-11-12 16:55:24.0 +0100
@@ -276,6 +276,26 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += \
+ src_libgo_configure.ac \
+ src_libgo_go_net_sendfile_gnu.go \
+ src_libgo_go_net_sock_gnu.go \
+ src_libgo_go_net_sockopt_gnu.go \
+ src_libgo_go_net_sockoptip_gnu.go \
+ src_libgo_go_syscall_libcall_gnu_386.go \
+ src_libgo_go_sysc

Re: Error in gnat-5-arm-linux-gnueabi package

2016-03-23 Thread Svante Signell
On Wed, 2016-03-23 at 16:41 +0100, Per Dalgas Jakobsen wrote:
> I installed the gnat-5-arm-linux-gnueabi package from testing, but 
> arm-linux-gnueabi-gnatmake gave me the following error:
> 
> $ arm-linux-gnueabi-gnatmake hello.adb
> arm-linux-gnueabi-gnatbind-5 -x hello.ali
> arm-linux-gnueabi-gnatlink-5 hello.ali
> arm-linux-gnueabi-gnatlink-5: Couldn't locate arm-linux-gnueabi-gcc-5-5
> arm-linux-gnueabi-gnatmake: *** link failed.
> 
> A simple:
> # ln -s /usr/bin/arm-linux-gnueabi-gcc-5 /usr/bin/arm-linux-gnueabi-gcc-5-5
> solved the problem.
> 
> I guess the -5-5 should have been a single "-5".
> 
> # uname -a
> Linux  4.3.0-1-amd64 #1 SMP Debian 4.3.5-1 (2016-02-06) x86_64 
> GNU/Linux

See bug #814978, stil not resolved.



Bug#815967: gcc-5: Updated ada-hurd.diff

2016-02-25 Thread Svante Signell
Source: gcc-5
Version: 5.3.1-10
Severity: important
Usertags: gnat-5, hurd
Tags: patch
User: debian-h...@lists.debian.org

Hello,

Attached is an updated patch for Ada with GNU/Hurd, returning zero for the
functions not yet
implemented: pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling
and pthread_setschedparam. The new patch removes the stub warnings when building
gcc and for code using these functions.

This patch also applies to gcc-6, so a separate bug report will be submitted to
the latest version in experimental. Best solution would be if this patch can be
accepted upstream, and will be attempted in parallel.

Thanks!Index: gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
===
--- /dev/null
+++ gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
@@ -0,0 +1,147 @@
+--
+--  --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+--  --
+--   S Y S T E M . O S _ I N T E R F A C E  --
+--  --
+--   B o d y--
+--  --
+-- Copyright (C) 1991-1994, Florida State University--
+-- Copyright (C) 1995-2006, AdaCore --
+--  --
+-- GNARL is free software; you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNARL; see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.  --
+--  --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package.
+
+pragma Polling (Off);
+--  Turn off polling, we do not want ATC polling to take place during
+--  tasking operations. It causes infinite loops and other problems.
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+package body System.OS_Interface is
+
+   
+   -- Get_Stack_Base --
+   
+
+   function Get_Stack_Base (thread : pthread_t) return Address is
+  pragma Warnings (Off, thread);
+
+   begin
+  return Null_Address;
+   end Get_Stack_Base;
+
+   --
+   -- pthread_init --
+   --
+
+   procedure pthread_init is
+   begin
+  null;
+   end pthread_init;
+
+   --
+   -- pthread_mutexattr_setprioceiling --
+   --
+
+   function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_setprioceiling;
+
+   --
+   -- pthread_mutexattr_getprioceiling --
+   --
+
+   function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : access int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutex

Bug#814978: gcc-5: gnat paths are wrong due to ada-gcc-name.diff

2016-02-18 Thread Svante Signell
tags 814978 patch
thanks

On Wed, 2016-02-17 at 12:06 +0100, Svante Signell wrote:
> On Wed, 2016-02-17 at 11:50 +0100, Matthias Klose wrote:
> > On 17.02.2016 10:31, Svante Signell wrote:
> > > Source: gcc-5
> > > Version: 5.3.1-8
> > > Severity: important
> > > Usertags: gnat-5
> 
> > this might be a bad merge/update; Ludovic, Nicolas, could you have a look?
> > GCC
> > 6 
> > likely has the same issue.
> 
> Yes, the problem is the same for gcc-6. One effect of this problem is that the
> acats tests fail ro run (all architectures).

Hi, it seems that the src/gcc/testsuite/ada/acats/run_all.sh script for the
acats tests has a bug in addition to the gnatchop gcc-5-5 bug, currently worked
around by soft linking gcc-5 to gcc-5-5.

The remaining problem is a carriage return character in the target_bit variable,
fixed by the patch:

--- a/src/gcc/testsuite/ada/acats/run_all.sh.orig   2016-02-17 
17:29:12.872370832 +0100
+++ b/src/gcc/testsuite/ada/acats/run_all.sh2016-02-18 12:09:48.636362809 
+0100
@@ -136,7 +136,7 @@
 # Find out the size in bit of an address on the target
 target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
 target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
-target_bit=`cat $dir/support/impbit.out`
+target_bit=`cat $dir/support/impbit.out` | sed -e 's/\r//g'
 echo target_bit="$target_bit" >> $dir/acats.log
 
 # Find out a suitable asm statement

The acats tests then run fine; on amd64 the result is:
=== acats Summary ===
# of expected passes2256
# of unexpected failures49
*** FAILURES: cd10001 cd2a83c cd2a91c cd30001 cd5003a cd5003b cd5003c cd5003d
cd5003e cd5003f cd5003g cd5003h cd5003i cd5011a cd5011c cd5011e cd5011g cd5011i
cd5011k cd5011m cd5011q cd5011s cd5012a cd5012b cd5012e cd5012f cd5012i cd5012m
cd5013a cd5013c cd5013e cd5013g cd5013i cd5013k cd5013m cd5013o cd5014a cd5014c
cd5014e cd5014g cd5014i cd5014k cd5014m cd5014o cd5014t cd5014v cd5014x cd5014y
cd5014z



Bug#814978: gcc-5: gnat paths are wrong due to ada-gcc-name.diff

2016-02-17 Thread Svante Signell
On Wed, 2016-02-17 at 11:50 +0100, Matthias Klose wrote:
> On 17.02.2016 10:31, Svante Signell wrote:
> > Source: gcc-5
> > Version: 5.3.1-8
> > Severity: important
> > Usertags: gnat-5

> this might be a bad merge/update; Ludovic, Nicolas, could you have a look? GCC
> 6 
> likely has the same issue.

Yes, the problem is the same for gcc-6. One effect of this problem is that the
acats tests fail ro run (all architectures).



Bug#814978: gcc-5: gnat paths are wrong due to ada-gcc-name.diff

2016-02-17 Thread Svante Signell
Source: gcc-5
Version: 5.3.1-8
Severity: important
Usertags: gnat-5

Hi,

Due to the Debian patch ada-gcc-name.diff the name of gcc becomes gcc-5-5
instead of gcc-5. This is easily shown with:
/usr/bin/gnatchop -v fc51b00.a
where fcb51b.a is located at src/gcc/testsuite/ada/acats/support/
(same when run as a shell command)

GNATCHOP 5.3.1
Copyright (C) 1998-2015, Free Software Foundation, Inc.
gcc-5-5: installation problem, executable not found
no source files written

However, issuing the command directly via path works:
gnatchop -v fc51b00.a
GNATCHOP 5.3.1
Copyright (C) 1998-2015, Free Software Foundation, Inc.
/usr/bin/gcc-5 -c -x ada -gnats -gnatu fc51b00.a
splitting fc51b00.a into:
   fc51b00.ads
with:
which gnatchop
/usr/bin/gnatchop

Strange, isn't it?



Bug#811063: gcc-6: FTBFS on kfreebsd-amd64 and kfreebsd-i386

2016-01-18 Thread Svante Signell
Hi Matthias, et al.

On Mon, 2016-01-18 at 12:56 +0100, Matthias Klose wrote:
> clone 811063 -1
> reopen -1
> retitle -1 gcc-6: FTBFS on kfreebsd-amd64 and kfreebsd-i386
> thanks
> 
> Steven, please could you have a look at upstreaming the kfreebsd patches?
> 
> On 17.01.2016 21:42, Steven Chamberlain wrote:
> > Hi,
> > 
> > Svante Signell wrote:
> > > I think the same patch applies to the kfreebsd-* builds as well. Adding
> > > the
> > > kfreebsd usertag to this bug.
> > 
> > Thank you very much, Svante!  The attached inter-diff against
> > ada-kfreebsd.diff fixes this for kfreebsd also.
> 
> I fixed that directly in the ada-s-osinte-gnu.ads.diff patch. However still 
> ftbfs with:

This file is for GNU/Hurd, the kFreeBSD file to patch is src/gcc/ada/s-osinte-
kfreebsd-gnu.ads.

HTH



Bug#811063: gcc-6: FTBFS on kfreebsd-amd64 and kfreebsd-i386

2016-01-15 Thread Svante Signell
usertags 811063 kfreebsd
thanks

I think the same patch applies to the kfreebsd-* builds as well. Adding the
kfreebsd usertag to this bug.

Thanks!



Bug#811063: gcc-6: FTBFS on hurd-i386

2016-01-15 Thread Svante Signell
Source: gcc-6
Version: 6-20160109-1
Severity: important
Tags: patch experimental
Usertags: hurd
User: debian-h...@lists.debian.org

Hello,

Currently gcc-6 in experimental FTBFS on GNU/Hurd, see
https://buildd.debian.org/status/fetch.php?pkg=gcc-6&arch=hurd-i386&ver=6-201601
09-1&stamp=1452539554

The problem is a double definition of Get_Page_Size in s-osinte-gnu.ads
resulting in error: s-taprop.adb:{326,981} ambiguous operand in conversion

Attached is a diff to the patch file, ada-hurd.diff, for GNU/Hurd: ada-
hurd_update.diff. Hopefully this solves the problem. Built successfully w/o the
testsuite.

Thanks!--- ada-hurd.diff.orig	2016-01-13 19:34:28.0 +0100
+++ ada-hurd.diff	2016-01-14 16:11:09.0 +0100
@@ -1,8 +1,8 @@
-Index: b/src/gcc/ada/s-osinte-gnu.ads
+Index: gcc-6-6-20160109/src/gcc/ada/s-osinte-gnu.ads
 ===
 --- /dev/null
-+++ b/src/gcc/ada/s-osinte-gnu.ads
-@@ -0,0 +1,802 @@
 gcc-6-6-20160109/src/gcc/ada/s-osinte-gnu.ads
+@@ -0,0 +1,801 @@
 +--
 +--  --
 +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS   --
@@ -349,9 +349,8 @@
 +   --  returns the stack base of the specified thread. Only call this function
 +   --  when Stack_Base_Available is True.
 +
-+   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize??
-+   function Get_Page_Size return size_t;
-+   function Get_Page_Size return Address;
++   --  From: /usr/include/unistd.h __getpagesize or getpagesize??
++   function Get_Page_Size return int;
 +   pragma Import (C, Get_Page_Size, "__getpagesize");
 +   --  Returns the size of a page
 +
@@ -805,10 +804,10 @@
 +   pragma Convention (C, pthread_rwlock_t);
 +
 +end System.OS_Interface;
-Index: b/src/gcc/ada/gcc-interface/Makefile.in
+Index: gcc-6-6-20160109/src/gcc/ada/gcc-interface/Makefile.in
 ===
 a/src/gcc/ada/gcc-interface/Makefile.in
-+++ b/src/gcc/ada/gcc-interface/Makefile.in
+--- gcc-6-6-20160109.orig/src/gcc/ada/gcc-interface/Makefile.in
 gcc-6-6-20160109/src/gcc/ada/gcc-interface/Makefile.in
 @@ -1421,6 +1421,35 @@ ifeq ($(strip $(filter-out %86 kfreebsd%
MISCLIB = -lutil
  endif


Bug#761248: gcc-4.9: Please enable gnat for kFreeBSD and Hurd again

2014-09-12 Thread Svante Signell
retitle 761248 gnat-4.9: gnat1 should be installed
in /usr/lib/i586-/4.9 not /usr/lib/i486-/4.9
reassign 761248 gnat-4.9
found 761248 4.9.1-1
thanks

On Fri, 2014-09-12 at 09:40 +0200, Matthias Klose wrote:
> Am 12.09.2014 um 09:27 schrieb Svante Signell:
> > On Fri, 2014-09-12 at 09:01 +0200, Matthias Klose wrote:
> >> Control: tags -1 + moreinfo

> Yes you are right, but gcc-4.9 does not find gnat1:
> make[3]: Entering directory '/home/srs/DEBs/gnat-4.9/music123-16.3'
> gnatmake -j1 -R -v -eS music123 -cargs -g -O2 -fstack-protector-strong
> -largs -Wl,-z,relro -Wl,--as-needed -Wl,-z,defs
> 
> GNATMAKE 4.9
> Copyright (C) 1992-2014, Free Software Foundation, Inc.
>   "music123.ali" being checked ...
>   -> "music123.ali" missing.
> gcc-4.9 -c -g -O2 -fstack-protector-strong music123.adb
> gcc-4.9: error trying to exec 'gnat1': execvp: No such file or
> directory
> End of compilation
> gnatmake: "music123.adb" compilation error
> 
> and it is here:
> dpkg -S /usr/lib/gcc/i486-gnu/4.9/gnat1
> gnat-4.9: /usr/lib/gcc/i486-gnu/4.9/gnat1
> 
> (can it be something in the gnat package?)

Found the problem: gcc-4.9 is expecting to find gnat1 at
/usr/lib/gcc/i586-{gnu,kfreebsd-gnu}/4.9/
but currently it is installed at
/usr/lib/gcc/i486-{gnu,kfreebsd-gnu}/4.9/

Creating a symbolic link make the build of music123 succeed. Reassigning
the bug to gnat-4.9. This should solve the build problems for both
kFreeBSD and Hurd.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1410522665.1097.48.ca...@g3620.my.own.domain



Re: Bug#759407: gnat-4.9: gnat1 not found on kfreebsd-i386

2014-09-12 Thread Svante Signell
reassign 759407 src:gnat-4.9
thanks

On Fri, 2014-09-12 at 11:31 +0200, Ludovic Brenta wrote:
> reassign 759407 src:gcc-4.9
> thanks
> 
> Hello,
> 
> Svante is correct on one point: some version of gcc-4.9 broke gnat-4.9
> on kfreebsd-i386 at least.  Proof: on August 11, gnat-4.9 (=4.9.1-1)
> worked perfectly well when combined with gcc-4.9 (exact version
> unspecified):
> 
> https://buildd.debian.org/status/fetch.php?pkg=libtemplates-parser&arch=kfreebsd-i386&ver=11.8.2014-3&stamp=1407787293
> 
> The symptoms appeared later, still with gnat-4.9 (=4.9.1-1) but with
> a later gcc-4.9; not a snapshot.  On August 24:
> 
> https://buildd.debian.org/status/fetch.php?pkg=gnat-gps&arch=kfreebsd-i386&ver=5.3-3&stamp=1408919003
> 
> Between these two dates (August 11 and August 24), there were no 
> uploads
> of gnat-4.9 but there were some uploads of gcc-4.9, therefore gcc-4.9
> must have broken something, possibly in the target triplet or directory
> where it looks for gnat1.

You are right: gcc-4.9 changed from /usr/lib/gcc/i486-*
to /usr/lib/gcc/i586-* There seems to be a lack of communication between
gcc and gnat maintainers in this case.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1410522701.1097.49.ca...@g3620.my.own.domain



Bug#761248: gcc-4.9: Please enable gnat for kFreeBSD and Hurd again

2014-09-12 Thread Svante Signell
On Fri, 2014-09-12 at 09:40 +0200, Matthias Klose wrote:
> Am 12.09.2014 um 09:27 schrieb Svante Signell:
> > On Fri, 2014-09-12 at 09:01 +0200, Matthias Klose wrote:
> >> Control: tags -1 + moreinfo
> >>

> > The part of debian/rules.defs is:
> > 
> > ifndef DEB_STAGE
> > # Ada 
> > ada_no_cpus := m32r sh3 sh3eb sh4 sh4eb
> > ada_no_systems  := 
> > ada_no_cross:= yes
> > ada_no_snap := no
> > ifeq ($(single_package),yes)
> >   ada_no_cpus += m68k powerpcspe sh4 sparc64
> >   ada_no_cpus += alpha
> >   ifneq (,$(filter $(DEB_TARGET_ARCH),m68k mips mipsel powerpcspe sh4
> > sparc64 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
> > ada_no_cpus += mips mipsel
> > ada_no_cpus += hurd-i386 kfreebsd-i386 kfreebsd-amd64
> > ada_no_snap := yes
> >   endif
> > endif
> > 
> > and later
> > 
> > ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(ada_no_cpus)))
> >   with_ada := disabled for cpu $(DEB_TARGET_ARCH_CPU)
> > endif
> > 
> > The problem is not ada_no_snap but ada_no_cpus causing gnat1 no longer
> > found by the gcc-4.9 compiler driver.
> 
> and everything guarded by: ifeq ($(single_package),yes), which is not set for
> gcc-4.9 and gnat-4.9 builds.

Yes you are right, but gcc-4.9 does not find gnat1:
make[3]: Entering directory '/home/srs/DEBs/gnat-4.9/music123-16.3'
gnatmake -j1 -R -v -eS music123 -cargs -g -O2 -fstack-protector-strong
-largs -Wl,-z,relro -Wl,--as-needed -Wl,-z,defs

GNATMAKE 4.9
Copyright (C) 1992-2014, Free Software Foundation, Inc.
  "music123.ali" being checked ...
  -> "music123.ali" missing.
gcc-4.9 -c -g -O2 -fstack-protector-strong music123.adb
gcc-4.9: error trying to exec 'gnat1': execvp: No such file or directory
End of compilation
gnatmake: "music123.adb" compilation error

and it is here:
dpkg -S /usr/lib/gcc/i486-gnu/4.9/gnat1
gnat-4.9: /usr/lib/gcc/i486-gnu/4.9/gnat1

(can it be something in the gnat package?)


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1410509083.1097.25.ca...@g3620.my.own.domain



Bug#761248: gcc-4.9: Please enable gnat for kFreeBSD and Hurd again

2014-09-12 Thread Svante Signell
On Fri, 2014-09-12 at 09:01 +0200, Matthias Klose wrote:
> Control: tags -1 + moreinfo
> 
> Am 12.09.2014 um 08:50 schrieb Svante Signell:
> > Source: gcc-4.9
> > Version: 4.9.1-13
> > Severity: important
> > User: debian-h...@lists.debian.org
> > Usertags: hurd, kfreebsd
> > 
> >>From the changelog of 4.9.1-6:
> > gcc-4.9 (4.9.1-6) unstable; urgency=medium
> > 
> >   * Disable Ada for snapshot builds on kfreebsd-i386, kfreebsd-amd64.
> > Local patch needs an update and upstreaming.
> >   * Disable Ada for snapshot builds on hurd-i386, build dependencies are
> > not installable.

> what has a patch for the snapshot builds to do with gnat-4.9?
> 
> If this is for the snapshot builds, did you test build the gcc-snapshot 
> package?

The part of debian/rules.defs is:

ifndef DEB_STAGE
# Ada 
ada_no_cpus := m32r sh3 sh3eb sh4 sh4eb
ada_no_systems  := 
ada_no_cross:= yes
ada_no_snap := no
ifeq ($(single_package),yes)
  ada_no_cpus += m68k powerpcspe sh4 sparc64
  ada_no_cpus += alpha
  ifneq (,$(filter $(DEB_TARGET_ARCH),m68k mips mipsel powerpcspe sh4
sparc64 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
ada_no_cpus += mips mipsel
ada_no_cpus += hurd-i386 kfreebsd-i386 kfreebsd-amd64
ada_no_snap := yes
  endif
endif

and later

ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(ada_no_cpus)))
  with_ada := disabled for cpu $(DEB_TARGET_ARCH_CPU)
endif

The problem is not ada_no_snap but ada_no_cpus causing gnat1 no longer
found by the gcc-4.9 compiler driver.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1410506878.1097.22.ca...@g3620.my.own.domain



Bug#761248: gcc-4.9: Please enable gnat for kFreeBSD and Hurd again

2014-09-11 Thread Svante Signell
Source: gcc-4.9
Version: 4.9.1-13
Severity: important
User: debian-h...@lists.debian.org
Usertags: hurd, kfreebsd

>From the changelog of 4.9.1-6:
gcc-4.9 (4.9.1-6) unstable; urgency=medium

  * Disable Ada for snapshot builds on kfreebsd-i386, kfreebsd-amd64.
Local patch needs an update and upstreaming.
  * Disable Ada for snapshot builds on hurd-i386, build dependencies are
not installable.

Please enable gnat for Hurd and kfreeBSD again. Without it gnat1 is not
found by gcc-4.9 and all packages scheduled for build fails.
For Hurd the missing build dependency of gdb is no more and gnat-4.9.1
builds, see:
https://buildd.debian.org/status/fetch.php?pkg=gnat-4.9&arch=hurd-i386&ver=4.9.1-1%2Bb1&stamp=1407885531

For kFreeBSD I admit that the local patch should be updated and
submitted upstream (and the Hurd patch), but due to this gnat is
scheduled for removal from testing with bug #759407.

Ludovic, can you help out here?

Below is the relevant part of the debdiff from between 4.9.1-6 and
4.9.1-5:
 --- gcc-4.9-4.9.1/debian/rules.defs
+++ gcc-4.9-4.9.1/debian/rules.defs
@@ -521,9 +521,7 @@
 ifeq ($(single_package),yes)
   ada_no_cpus += m68k powerpcspe sh4 sparc64
   ada_no_cpus += alpha
-  ifneq (,$(filter $(DEB_TARGET_ARCH),m68k mips mipsel powerpcspe sh4 sparc64 
hurd-i386 kfreebsd-i386 kfreebsd-amd64))
-ada_no_cpus += mips mipsel
-ada_no_cpus += hurd-i386 kfreebsd-i386 kfreebsd-amd64
+  ifneq (,$(filter $(DEB_TARGET_ARCH),m68k powerpcspe sh4 sparc64))
 ada_no_snap := yes
   endif
 endif


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1410504647.1097.16.ca...@g3620.my.own.domain



Bug#740286: gnat-4.9: s-osinte-posix.adb is wrong about timespec.tv_nsec compared to gnat-4.8

2014-03-23 Thread Svante Signell
On Sun, 2014-03-23 at 19:13 +0100, Ludovic Brenta wrote:
> Ludovic Brenta writes:
> > Svante Signell  writes:
> >> Ping, adding this bug report to debian-ada too. Who is Ada upstream?
> >
> > Patience.  I'm waiting for Matthias to upload a newer gcc-4.9-source
> > containing the fix for your bug #740153, then I will upload a gnat-4.9
> > incorporating this and your patch.
> 
> Now that the newer gcc-4.9 has been uploaded, I am reviewing this issue
> and I discovered that the change you complain about was in fact made
> upstream (that was not clear to me from your bug report):
> 
> commit e3a1f6b50495473f677f413d8740808a3fde5a9a
> Author: hjl 
> Date:   Fri Nov 15 12:06:25 2013 +
> 
> Add and use System.Linux.time_t for time_t
> 
>   PR ada/54040

>   * s-osinte-linux.ads (time_t): Mark it private.  Replace long
>   with System.Linux.time_t.
>   (timespec): Replace long with time_t.
>   * s-osinte-posix.adb (To_Timespec): Likewise.
>   * s-taprop-linux.adb (timeval): Replace C.long with
>   System.OS_Interface.time_t.

> I also see that s-osinte-gnu.ads, which is used solely by hurd-i386 and
> added by the Debian patch ada-hurd.diff, has this to say about the
> matter:
> 
>type time_t is new long;
> 
>type timespec is record
>   tv_sec  : time_t;
>   tv_nsec : long;
>end record;
>pragma Convention (C, timespec);
> 
> I propose to make "time_t" a subtype, rather than a derived type, of
> long.  This should keep everyone happy.  Comments?

I don't see the reason for upstream to change tv_nsec to time_t at all
in s-osinte-posix.adb., see the POSIX spec and Linux/etc header files
referred to earlier! Independent on if it is a private or not.

s-osinte-linux-ads:
type time_t is private;

   type time_t is new System.Linux.time_t;

   type timespec is record
  tv_sec  : time_t;
  tv_nsec : time_t;
   end record;
   pragma Convention (C, timespec);

s-osinte-kfreebsd-gnu.ads:
type time_t is new long;

   type timespec is record
  tv_sec  : time_t;
  tv_nsec : time_t;
   end record;
   pragma Convention (C, timespec);

(same problems with kFreeBSD as for Hurd. Therefore s-osinte-posix.adb
was modified to s-osinte-kfreebsd-gnu.adb in ada-kfreebsd.diff (this
part of the patch is not necessary, it should be possible to use the
posix (.adb) version))


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1395636382.5365.13.ca...@g3620.my.own.domain



Re: Bug#740153: gcc-4.9: FTBFS on hurd-i386

2014-03-19 Thread Svante Signell
On Wed, 2014-02-26 at 13:06 +0100, Svante Signell wrote:
> Source: gcc-4.9
> Version: 4.9-20140218-1
> Severity: important
> Tags: patch experimental upstream
> User: debian-h...@lists.debian.org
> Usertags: hurd
> 
> Hi,
> 
> Currently gcc-4.9 fails to build on GNU/Hurd due to WCONTINUED not
> being defined. The attached patch solves this problem by only using
> that option as third argument to waitpid when available. This flag is
> Linux-specific, and according to the Linux waitpid man page it was
> introduced in 2.6.10.

Fixed upstream, with a somewhat different solution, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60571



-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1395216047.17468.32.ca...@g3620.my.own.domain



Bug#740286: gnat-4.9: s-osinte-posix.adb is wrong about timespec.tv_nsec compared to gnat-4.8

2014-03-17 Thread Svante Signell
Ping, adding this bug report to debian-ada too. Who is Ada upstream?

Thanks!

On Thu, 2014-02-27 at 22:09 +0100, Svante Signell wrote:
> Source: gnat-4.9
> Version: 4.9-20140218-2
> Severity: important
> Tags: patch experimental upstream
> User: debian-h...@lists.debian.org
> Usertags: hurd kfreebsd
> 
> Hi,
> 
> I'm not so sure there is a need to move from s-osinte-posix.adb to the
> patched version s-osinte-kfreebsd-gnu.adb for kfreebsd. I see the same
> build problem as before when building gnat-4.9 on GNU/Hurd. I think the
> change from gnat-4.8 to gnat-4.9 in s-osinte-posix.adb is wrong
> (edited):
> 
> --- gnat-4.8/gnat-4.8-4.8.2-5/src/gcc/ada/s-osinte-posix.adb
> 2011-08-01 17:05:02.0 +0200
> +++ gnat-4.9/gnat-4.9-4.9-20140218/src/gcc/ada/s-osinte-posix.adb
> 2013-11-16 20:23:13.0 +0100
> 
> return timespec'(tv_sec => S,
> -  tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
> +  tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
> end To_Timespec;
> 
>  end System.OS_Interface;
> 
> According to Posix the tv_nsec should be long:
> http://pubs.opengroup.org/onlinepubs/009695299/basedefs/time.h.html
> 
> The  header shall declare the structure timespec, which has at
> least the following members:
> 
> time_t  tv_secSeconds. 
> longtv_nsec   Nanoseconds. 
> 
> Linux/kFreeBSD/Hurd all defines struct timespec in time.h as follows:
> /* POSIX.1b structure for a time value.  This is like a `struct timeval'
> but
>has nanoseconds instead of microseconds.  */
> struct timespec
>   {
> __time_t tv_sec;/* Seconds.  */
> __syscall_slong_t tv_nsec;  /* Nanoseconds.  */
>   };
> 
> 


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1395061392.17468.3.ca...@g3620.my.own.domain



Re. gcc-4.9_4.9-20140303-1_amd64.changes ACCEPTED into experimental

2014-03-04 Thread Svante Signell
Hi,

Since gcc-4.9_4.9-20140218-1 does not build on GNU/Hurd due to a minor
error in gcc/lto/lto.c, see bug #740153, I had hopes that this version
could have included that patch (and forwarded upstream). The currently
main reason to have gcc-4.9 building on GNU/Hurd since it is needed for
gnat-4.9, and we are working on making it build on GNU/Hurd too.

Thanks!


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1393928236.25425.20.ca...@g3620.my.own.domain



Bug#740286: gnat-4.9: s-osinte-posix.adb is wrong about timespec.tv_nsec compared to gnat-4.8

2014-02-27 Thread Svante Signell
Source: gnat-4.9
Version: 4.9-20140218-2
Severity: important
Tags: patch experimental upstream
User: debian-h...@lists.debian.org
Usertags: hurd kfreebsd

Hi,

I'm not so sure there is a need to move from s-osinte-posix.adb to the
patched version s-osinte-kfreebsd-gnu.adb for kfreebsd. I see the same
build problem as before when building gnat-4.9 on GNU/Hurd. I think the
change from gnat-4.8 to gnat-4.9 in s-osinte-posix.adb is wrong
(edited):

--- gnat-4.8/gnat-4.8-4.8.2-5/src/gcc/ada/s-osinte-posix.adb
2011-08-01 17:05:02.0 +0200
+++ gnat-4.9/gnat-4.9-4.9-20140218/src/gcc/ada/s-osinte-posix.adb
2013-11-16 20:23:13.0 +0100

return timespec'(tv_sec => S,
-  tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
+  tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;

 end System.OS_Interface;

According to Posix the tv_nsec should be long:
http://pubs.opengroup.org/onlinepubs/009695299/basedefs/time.h.html

The  header shall declare the structure timespec, which has at
least the following members:

time_t  tv_secSeconds. 
longtv_nsec   Nanoseconds. 

Linux/kFreeBSD/Hurd all defines struct timespec in time.h as follows:
/* POSIX.1b structure for a time value.  This is like a `struct timeval'
but
   has nanoseconds instead of microseconds.  */
struct timespec
  {
__time_t tv_sec;/* Seconds.  */
__syscall_slong_t tv_nsec;  /* Nanoseconds.  */
  };


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1393535388.18859.89.ca...@g3620.my.own.domain



Bug#740153: gcc-4.9: FTBFS on hurd-i386

2014-02-26 Thread Svante Signell
Source: gcc-4.9
Version: 4.9-20140218-1
Severity: important
Tags: patch experimental upstream
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

Currently gcc-4.9 fails to build on GNU/Hurd due to WCONTINUED not
being defined. The attached patch solves this problem by only using
that option as third argument to waitpid when available. This flag is
Linux-specific, and according to the Linux waitpid man page it was
introduced in 2.6.10.

Thanks!




--- a/src/gcc/lto/lto.c.orig	2014-02-14 19:22:14.0 +0100
+++ b/src/gcc/lto/lto.c	2014-02-25 20:50:20.0 +0100
@@ -2476,7 +2476,11 @@
   int status;
   do
 {
+#ifndef WCONTINUED
+  int w = waitpid(0, &status, WUNTRACED);
+#else
   int w = waitpid(0, &status, WUNTRACED | WCONTINUED);
+#endif
   if (w == -1)
 	fatal_error ("waitpid failed");
 


Bug#732681: Line 767 one character too long :(

2014-02-03 Thread Svante Signell
reopen 732681
found 732681 4.8.2-7
thanks

Hello,

Due to some unfortunate reason line 767 of ada-s-osinte-gnu.ads was one
character too long, 80 instead of 79, causing the build failure. I see
now that when building that line was already broken in two pieces but
in the patch it was not.

Editing Ada code in Emacs is tricky, my settings are not
optimal, for example all variables even if all lower case are
automatically transformed to a mix of upper-and-lower case
characters.

Attached is a diff to that file, where line 767 is broken into two
lines.

>Closes: 732681
>Changes: 
> gnat-4.8 (4.8.2-7) unstable; urgency=low
> .
>   * debian/patches/gcc_ada_gcc-interface_Makefile.in.diff: rename
>to...
>   * debian/patches/ada-hurd.diff: ... this; add a hunk to create
> s-osinte-gnu.ads.  Closes: #732681.
>   * debian/rules.patch: apply ada-hurd.diff on all architectures, to
>help detect bugs.

I'm very sorry for this, and understand fully if you wait to submit a
new version until other changes are needed.

Thanks! 
--- debian_patches_ada-s-osinte-gnu.ads_line767.diff	2013-12-18 18:03:36.0 +0100
+++ debian_patches_ada-s-osinte-gnu.ads.diff	2014-02-04 05:03:53.0 +0100
@@ -1,6 +1,6 @@
 --- /dev/null	2012-01-30 20:41:15.189616186 +0100
 +++ b/src/gcc/ada/s-osinte-gnu.ads	2012-04-11 19:34:45.0 +0200
-@@ -0,0 +1,813 @@
+@@ -0,0 +1,814 @@
 +--
 +--  --
 +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS   --
@@ -767,7 +767,8 @@
 +   --  typedef struct __pthread_condattr pthread_condattr_t;
 +   --  /usr/include/i386-gnu/bits/condition.h:struct __pthread_cond{}
 +   --  pthread_condattr_t: see above!
-+   --  /usr/include/i386-gnu/bits/condition.h:struct __pthread_condimpl *__impl;
++   --  /usr/include/i386-gnu/bits/condition.h:
++   --  struct __pthread_condimpl *__impl;
 +
 +   type pthread_cond_t is record
 +  lock   : int;


Bug#732681: ping!

2014-01-27 Thread Svante Signell
Hi,

I know you are very short of time but having gnat-4.8 to build also on
GNU/Hurd would be nice. Especially when more and more packages will
build-depend on it, leaving gnat-4.6 dependencies.

Thanks!


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1390817610.13428.22.ca...@g3620.my.own.domain



Bug#732681: gnat-4.8: FTBFS on hurd-i386

2013-12-20 Thread Svante Signell
Source: gnat-4.8
Version: 4.8.2-5
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

Currently gnat-4.8 FTBFS on GNU/Hurd, see
https://buildd.debian.org/status/fetch.php?pkg=gnat-4.8&arch=hurd-i386&ver=4.8.2-5&stamp=1387071188

Attached are four patches enabling the build again:

1) debian_patches_ada-kfreebsd.diff.update: a one line update to the
kfreebsd patch to avoid including termio.h which does not exist.

2) debian_patches_gcc_ada_gcc-interface_Makefile.in.diff.update: an
update to the patch for adding Hurd support: now both s-osinte-*.adb and
s-taprop-*.ads are using the posix versions.

3) debian_patches_ada-s-osinte-gnu.ads.diff: An updated version of the
OS Specific interface: s-osinte-gnu.ads

4) debian_rules.patch.diff: A modification of rules.patch to reflect
that posix versions are used for the files in 2) above. Of course the
generated debian/patches/series file will change accordingly.

The first three patches can be proposed upstream when verified that more
packages build and work properly with the 4.8 version. Currently only
music123 and gcc-mingw-w64 build-depend on gnat-4.8, They have been
built w/o problems.

Thanks!
--- a/debian/patches/ada-kfreebsd.diff  2013-10-31 22:31:40.0 +0100
+++ b/debian/patches/ada-kfreebsd.diff  2013-11-13 01:43:04.0 +0100
@@ -8,7 +8,7 @@
  /* On some system termio is either absent or including it will disable termios
 (HP-UX) */
  #if ! defined (__hpux__) && ! defined (FREEBSD) && \
-+! defined (__FreeBSD_kernel__) && \
++! defined (__FreeBSD_kernel__) && ! defined (__GNU__) && \
  ! defined (__APPLE__) && ! defined(__rtems__)
  #   include 
  #endif
--- a/debianpatches/gcc/ada/gcc-interface_Makefile.in.diff	2013-12-17 18:26:05.0 +0100
+++ b/debian/patches/gcc/ada/gcc-interface_Makefile.in.diff	2013-12-17 18:26:53.0 +0100
@@ -11,10 +11,10 @@
 +  a-numaux.ads--- /dev/null	2012-01-30 20:41:15.189616186 +0100
+++ b/src/gcc/ada/s-osinte-gnu.ads	2012-04-11 19:34:45.0 +0200
@@ -0,0 +1,813 @@
+--
+--  --
+--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS   --
+--  --
+--   S Y S T E M . O S _ I N T E R F A C E  --
+--  --
+--  S p e c --
+--  --
+-- Copyright (C) 1991-1994, Florida State University--
+--  Copyright (C) 1995-2011, Free Software Foundation, Inc. --
+--  --
+-- GNARL is free software; you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNARL; see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.  --
+--  --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+--  PLEASE DO NOT add any with-clauses to this package or remove the pragma
+--  Preelaborate. This package is designed to be a

Bug#685559: gnat-4.6 s/__kFreeBSD_kernel__/__FreeBSD_kernel__/

2012-10-01 Thread Svante Signell
On Sat, 2012-09-29 at 21:20 +0200, Svante Signell wrote:
> On Sat, 2012-09-29 at 11:24 -0700, Christoph Egger wrote:
> > found 685559 4.6.3-6
> > bye
> > 
> > Hi!
> > 
> >   Change __kFreeBSD_kernel__ to __FreeBSD_kernel__ and it will actually
> > work ;-)
> > 
> 
> Hi,
> 
> Sorry for not seeing that. I'm not used to the FreeBSD gcc definitions
> (yet). I don't run kfreebsd for everyday use.
> 
> Thanks!

Just for the record, after restarting kfreebsd under kvm the patch there
was using __FreeBSD_kernel__ not __kFreeBSD_kernel__. I even tested to
build polyorb too with the patched gnat-4.6 :-) Something when wrong
when creating the patch (too simple so it was probably a human error)


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1349092600.29093.46.ca...@s1499.it.kth.se



Bug#685559: gnat-4.6 s/__kFreeBSD_kernel__/__FreeBSD_kernel__/

2012-09-29 Thread Svante Signell
On Sat, 2012-09-29 at 11:24 -0700, Christoph Egger wrote:
> found 685559 4.6.3-6
> bye
> 
> Hi!
> 
>   Change __kFreeBSD_kernel__ to __FreeBSD_kernel__ and it will actually
> work ;-)
> 

Hi,

Sorry for not seeing that. I'm not used to the FreeBSD gcc definitions
(yet). I don't run kfreebsd for everyday use.

Thanks!


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1348946443.4291.3.camel@x60



Bug#685562: gnat-4.6: Add -lrt flag to link libgnarl-4.6.so.1

2012-08-21 Thread Svante Signell
Package: gnat-4.6
Version: 4.6.3-5
Severity: important
Tags: patch
Usertags: kfreebsd
User: debian-...@lists.debian.org

When building polyorb-2.8~20110207 for GNU/kFreeBSD linking of
DYNAMIC/tools/po_catref/po_catref fails due to an undefined reference:
/usr/lib/i386-gnu/libgnarl-4.6.so.1: undefined reference to
`clock_gettime'

The reason for that is that libgnarl-4.6.so.1 is not linked with
librt.so.1. The solution is to add -lrt to the THREADSLIB variable.
Preferably it could be applied by modifying the patch:
ada-kfreebsd-gnu.diff. 

A diff for Makefile.in is inlined below.
--- a/src/gcc/ada/gcc-interface/Makefile.in 2012-08-20
14:04:41.0 +0200
+++ b/src/gcc/ada/gcc-interface/Makefile.in 2012-08-20
18:20:57.0 +0200
@@ -1137,7 +1137,7 @@
 indepsw.adbhttp://lists.debian.org/1345586947.25812.64.ca...@hp.my.own.domain



Bug#685561: gnat-4.6: Add -lrt flag to link libgnarl-4.6.so.1

2012-08-21 Thread Svante Signell
Package: gnat-4.6
Version: 4.6.3-5
Severity: important
Tags: patch
Usertags: hurd
User: debian-h...@lists.debian.org

When building polyorb-2.8~20110207 for GNU/Hurd linking of
DYNAMIC/tools/po_catref/po_catref fails due to an undefined reference:
/usr/lib/i386-gnu/libgnarl-4.6.so.1: undefined reference to
`clock_gettime'

The reason for that is that libgnarl-4.6.so.1 is not linked with
librt.so.1. The solution is to add -lrt to the THREADSLIB variable.
Preferably it could be applied by modifying the patch: 
gcc_ada_gcc-interface_Makefile.in.diff
--- a/debian/patches/gcc_ada_gcc-interface_Makefile.in.diff 2012-07-19
00:12:30.0 +0200
+++ b/debian/patches/gcc_ada_gcc-interface_Makefile.in.diff 2012-08-21
23:52:59.0 +0200
@@ -24,7 +24,7 @@
 +indepsw.adbhttp://lists.debian.org/1345586415.25812.57.ca...@hp.my.own.domain



Bug#685559: gnat-4.6: Use GCC stack frame unwinder for GNU/kFreeBSD in tracebak.c

2012-08-21 Thread Svante Signell
Package: gnat-4.6
Version: 4.6.3-5
Severity: important
Tags: patch
Usertags: kfreebsd
User: debian-...@lists.debian.org

Hello,

When building polyorb-2.8~20110207 for GNU/kFreeBSD it segfaults, see 
https://buildd.debian.org/status/fetch.php?pkg=polyorb&arch=kfreebsd-i386&ver=2.8~20110207-3&stamp=1338587039

Building non-stripped versions of libgnat-4.6.so.1 and libgnarl-4.6.so.1
the gdb backtrace revealed that the stack unwinder with
USE_GENERIC_UNWINDER in gcc/ada/tracebak.c is the cause (as for
GNU/Hurd).

With USE_GCC_UNWINDER the build works, except for a linker error later
on, see separate bug reports for gnat-4.6 of gcc-interface/Makefile.in
changes for Hurd and kFreeBSD! 

The patch is inlined below. Preferably it could be applied by modifying
the last part of the recent patch: ada-symbolic-tracebacks.diff
--- a/src/gcc/ada/tracebak.c2012-08-20 14:10:21.0 +0200
+++ b/src/gcc/ada/tracebak.c2012-08-20 18:30:35.0 +0200
@@ -320,7 +320,7 @@
 /* Starting with GCC 4.6, -fomit-frame-pointer is turned on by default
for
32-bit x86/Linux as well and DWARF 2 unwind tables are emitted
instead.
See the x86-64 case below for the drawbacks with this approach.  */
-#if (defined (linux) || defined(__GNU__)) && (__GNUC__ * 10 +
__GNUC_MINOR__ > 45)
+#if (defined (linux) || defined(__GNU__) ||
defined(__kFreeBSD_kernel__)) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
 #define USE_GCC_UNWINDER
 #else
 #define USE_GENERIC_UNWINDER


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1345585147.25812.44.ca...@hp.my.own.domain



Bug#681998: gnat-4.6: Use GCC stack frame unwinder for GNU/Hurd in tracebak.c

2012-07-18 Thread Svante Signell
Package: gnat-4.6
Version: 4.6.2-4
Severity: important
Tags: patch
Usertags: hurd
User: debian-h...@lists.debian.org

Hello,

Trying to find the problems with gprbuild, see bug #673015, the
traceback function used for GNU/Hurd caused a segfault for gprconfig.
Digging further revealed that the GNU/Hurd stack frame does not seem to
be static enough to define USE_GENERIC_UNWINDER in gcc/ada/tracebak.c.

However, USE_GCC_UNWINDER works (and the dummy version of course)! The
patch is inlined below.

--- a/src/gcc/ada/tracebak.c 2011-09-19 11:10:42.0 +0200
+++ b/src/gcc/ada/tracebak.c 2012-07-17 08:46:29.0 +0200
@@ -320,7 +320,7 @@
 /* Starting with GCC 4.6, -fomit-frame-pointer is turned on by default
for
32-bit x86/Linux as well and DWARF 2 unwind tables are emitted
instead.
See the x86-64 case below for the drawbacks with this approach.  */
-#if defined (linux) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
+#if (defined (linux) || defined(__GNU__)) && (__GNUC__ * 10 +
__GNUC_MINOR__ > 45)
 #define USE_GCC_UNWINDER
 #else
 #define USE_GENERIC_UNWINDER


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1342625315.16717.12.camel@x60



Re: Accepted gcc-defaults 1.118 (source all amd64)

2012-05-29 Thread Svante Signell
On Sun, 2012-05-27 at 08:34 +0200, Yves-Alexis Perez wrote:
> On dim., 2012-05-27 at 00:52 +0200, Svante Signell wrote:
> > On Sat, 2012-05-26 at 23:51 +0200, Philipp Kern wrote:
...
> > With all due respect, So far I have not seen any bug report causing the
> > gcc-4.7 as default compiler being serious enough to make it reverted.
> > Name the problematic bugs then, please. And, where is the big problem,
> > please explain?
> 
> You mean something like
> http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-gcc-4.7;users=debian-gcc@lists.debian.org
>  ?

Looks like the list of bugs for gcc-4.7 is quickly diminishing. Most
remaining have patches or are pending upload. Looks like most problems
was missing inclusion of  or some symbols no longer visible. 


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1338283918.8802.266.ca...@s1499.it.kth.se



Re: Accepted gcc-defaults 1.118 (source all amd64)

2012-05-26 Thread Svante Signell
On Sat, 2012-05-26 at 23:51 +0200, Philipp Kern wrote:
> Svante,
> 
> am Sat, May 26, 2012 at 10:58:10PM +0200 hast du folgendes geschrieben:
> > On Sat, 2012-05-26 at 19:39 +0200, Julien Cristau wrote:
> > > On Sun, May 13, 2012 at 19:56:15 +0200, Matthias Klose wrote:
> > > > sorry, thinko. I did mean End of May.
> > > So we're at the end of May.  Can we have that revert now, or do I need
> > > to NMU?
> > Stop nagging about the default gcc compiler for wheezy. Right now it is
> > gcc-4.7, and problems will be resolved in due time for the release.
> 
> sorry to annoy you but nagging about problems of the upcoming release is
> actually our job description.  So no, we won't stop just because you're 
> telling
> us to, just with solid reasons instead of handwaving about it all going away
> because you say so.  It's a hell lot of work it's causing.  Nobody's saying
> anything against having gcc-4.7 as an option.

Philipp,

With all due respect, So far I have not seen any bug report causing the
gcc-4.7 as default compiler being serious enough to make it reverted.
Name the problematic bugs then, please. And, where is the big problem,
please explain?



-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1338072725.3547.10.camel@x60



Re: Accepted gcc-defaults 1.118 (source all amd64)

2012-05-26 Thread Svante Signell
On Sat, 2012-05-26 at 19:39 +0200, Julien Cristau wrote:
> On Sun, May 13, 2012 at 19:56:15 +0200, Matthias Klose wrote:
> 
> > sorry, thinko. I did mean End of May.
> > 
> So we're at the end of May.  Can we have that revert now, or do I need
> to NMU?

Stop nagging about the default gcc compiler for wheezy. Right now it is
gcc-4.7, and problems will be resolved in due time for the release.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1338065890.3547.2.camel@x60



How to specify a limited set of languages to build in Debian gcc-{4.6,4.7}?

2012-04-17 Thread Svante Signell
Hi,

I wonder how to most easily specify a limited set of languages to build
in Debian version of gcc-4.7 for a given architecture. It shows to be
non-trivial, with all these debian/{rules,rules.defs,rules2}, etc, and
adding to that the configure script in src. I would like to enable only
c,c++,go or just go, for testing/porting purposes.

Thanks!


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1334666802.2962.602.ca...@s1499.it.kth.se



Bug#668426: Add support Ada for GNU/Hurd

2012-04-12 Thread Svante Signell
On Thu, 2012-04-12 at 14:14 +0200, Samuel Thibault wrote:
> I will handle these, as well as commiting your latest working Ada patch,
> which thus does not need a bug report.

Are you also submitting the relevant patches to upstream?





-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1334234782.8013.292.ca...@hp.my.own.domain



Bug#668425: gcc-4.6: Add support Ada for GNU/Hurd

2012-04-11 Thread Svante Signell
Source: gcc-4.6
Source-version: 4.6.3-3
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

The inlined patch below fixes disabling of Ada for the compiler driver
gcc-4.6 for GNU/Hurd. The reason for removing the dormant port
knetbsd-gnu is due to that having gnu in the name triggers the
disabling of Ada also for GNU/Hurd. Patches to enable Ada for GNU/Hurd,
will be sent separately to the gnat-4.6 package.  This patch also
applies to gcc-4.7.0 and a separate bug report will be sent there. 

--- a/debian/rules.defs 2012-04-02 10:40:36.0 +0200
+++ b/debian/rules.defs 2012-04-02 10:02:51.0 +0200
@@ -391,7 +391,7 @@
 ifndef DEB_STAGE
 # Ada 
 ada_no_cpus:= m32r sh3 sh3eb sh4 sh4eb
-ada_no_systems := gnu knetbsd-gnu
+ada_no_systems :=
 ada_no_cross   := yes
 ada_no_snap:= no
 ifneq (,$(filter $(DEB_TARGET_ARCH),armhf m68k powerpcspe sh4 sparc64))





-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1334170933.2962.526.ca...@s1499.it.kth.se



  1   2   >