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 passes 119
# of unexpected failures 15
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 <errno.h>' | ${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 <errno.h>' | ${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