From 194f08aeae13ec71ef4707591ea5c5e08b6cc2f9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Aug 2017 18:09:12 +0000 Subject: [PATCH] re PR go/81617 (mksigtab.sh fails to resolve NSIG with glibc 2.26) PR go/81617 libgo: change mksigtab to recognize glibc 2.26 NSIG expression Fixes golang/go#21147 Fixes GCC PR 81617 Reviewed-on: https://go-review.googlesource.com/52611 From-SVN: r250858 --- gcc/go/gofrontend/MERGE | 2 +- libgo/mksigtab.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7c96176261b..bf07b7f76f2 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh index c3319705b81..2b07dd491b1 100644 --- a/libgo/mksigtab.sh +++ b/libgo/mksigtab.sh @@ -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 -- 2.30.2