This patch to libgo changes the mksigtab script to recognize the glibc
2.26 NSIG expression.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.  Will commit to GCC 7
branch when it reopens.  This fixes GCC PR 81617 and
https://golang.org/issue/21147.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 250832)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-c1ac6bc99f988633c6bc68a5ca9ffad3487750ef
+adac632f95d1cd3421c9c1df5204db10b6a92c44
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/mksigtab.sh
===================================================================
--- libgo/mksigtab.sh   (revision 250406)
+++ libgo/mksigtab.sh   (working copy)
@@ -107,6 +107,19 @@ if test "${GOOS}" = "aix"; then
     nsig=`expr $nsig + 1`
 else
     nsig=`grep 'const _*NSIG = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = 
\([0-9]*\)/\1/'`
+    if test -z "$nsig"; then
+       if grep 'const _*NSIG = [ (]*_*SIGRTMAX + 1[ )]*' gen-sysinfo.go 
>/dev/null 2>&1; then
+           rtmax=`grep 'const _*SIGRTMAX = [0-9]*$' gen-sysinfo.go | sed -e 
's/.* = \([0-9]*\)/\1/'`
+           if test -n "$rtmax"; then
+               nsig=`expr $rtmax + 1`
+           fi
+       fi
+    fi
+fi
+
+if test -z "$nsig"; then
+    echo 1>&2 "could not determine number of signals"
+    exit 1
 fi
 
 i=1

Reply via email to