This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libgo patch committed: Define SIGPOLL and SIGCLD if necessary
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Wed, 24 Oct 2012 12:01:30 -0700
- Subject: libgo patch committed: Define SIGPOLL and SIGCLD if necessary
This patch to libgo arranges to define SIGPOLL and SIGCLD if necessary,
as SIGIO and SIGCHLD respectively. This is necessary on GNU/Linux
because SIGPOLL is #define'd as SIGIO before SIGIO is #define'd, and gcc
-fdump-go-spec doesn't understand that. Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7
branch.
Ian
diff -r 961c515492df libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh Tue Oct 23 11:00:44 2012 -0700
+++ b/libgo/mksysinfo.sh Wed Oct 24 11:57:46 2012 -0700
@@ -225,6 +225,16 @@
grep '^const _SIG[^_]' gen-sysinfo.go | \
grep -v '^const _SIGEV_' | \
sed -e 's/^\(const \)_\(SIG[^= ]*\)\(.*\)$/\1\2 = Signal(_\2)/' >> ${OUT}
+if ! grep '^const SIGPOLL ' ${OUT} >/dev/null 2>&1; then
+ if grep '^const SIGIO ' ${OUT} > /dev/null 2>&1; then
+ echo "const SIGPOLL = SIGIO" >> ${OUT}
+ fi
+fi
+if ! grep '^const SIGCLD ' ${OUT} >/dev/null 2>&1; then
+ if grep '^const SIGCHLD ' ${OUT} >/dev/null 2>&1; then
+ echo "const SIGCLD = SIGCHLD" >> ${OUT}
+ fi
+fi
# The syscall numbers. We force the names to upper case.
grep '^const _SYS_' gen-sysinfo.go | \