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 | \