This libgo patch changes the mksysinfo shell script to always define WEXITED and WNOWAIT on GNU/Linux. This fixes PR 88135. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 266490) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -26639de5b48ca895f517b7b5f5720b2613f885ce +3ecc845c337c15d9a19ed8d277e5ee9eaf49c3ad The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 266333) +++ libgo/mksysinfo.sh (working copy) @@ -173,6 +173,15 @@ if grep '^const ___WALL = ' gen-sysinfo. && ! grep '^const _WALL = ' gen-sysinfo.go >/dev/null 2>&1; then echo 'const WALL = ___WALL' >> ${OUT} fi +# On GNU/Linux the os package requires WEXITED and WNOWAIT. +if test "${GOOS}" = "linux"; then + if ! grep '^const WEXITED = ' ${OUT} >/dev/null 2>&1; then + echo 'const WEXITED = 4' >> ${OUT} + fi + if ! grep '^const WNOWAIT = ' ${OUT} >/dev/null 2>&1; then + echo 'const WNOWAIT = 0x01000000' >> ${OUT} + fi +fi # Networking constants. egrep '^const _(AF|ARPHRD|ETH|IN|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |