summaryrefslogtreecommitdiff
path: root/libgo/mksigtab.sh
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-08-03 18:09:12 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-08-03 18:09:12 +0000
commit194f08aeae13ec71ef4707591ea5c5e08b6cc2f9 (patch)
tree285229ad415c327cbfd387d2167be9bdc4be18e5 /libgo/mksigtab.sh
parent2fdaed8980c3bd595507a0be3a9a43386c872b51 (diff)
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
Diffstat (limited to 'libgo/mksigtab.sh')
-rw-r--r--libgo/mksigtab.sh13
1 files changed, 13 insertions, 0 deletions
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