This libgo patch avoids using \? in a grep pattern. It's not supported by Solaris grep. Just use * instead; it matches more but it shouldn't matter. This fixes GCC PR 91764. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 275698) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -ceb1e4f5614b4772eed44f9cf57780e52f44753e +5af62eda697da21155091cf5375ed9edb4639b67 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/match.sh =================================================================== --- libgo/match.sh (revision 275698) +++ libgo/match.sh (working copy) @@ -135,7 +135,7 @@ for f in $gofiles; do if test x$tag1 != xnonmatchingtag -a x$tag2 != xnonmatchingtag; then # Pipe through cat so that `set -e` doesn't affect fgrep. - tags=`sed '/^package /q' < $f | grep '^// \?+build ' | cat` + tags=`sed '/^package /q' < $f | grep '^// *+build ' | cat` omatch=true first=true match=false Index: libgo/testsuite/gotest =================================================================== --- libgo/testsuite/gotest (revision 275698) +++ libgo/testsuite/gotest (working copy) @@ -326,7 +326,7 @@ x) esac if test x$tag1 != xnonmatchingtag -a x$tag2 != xnonmatchingtag; then - tags=`sed '/^package /q' < $f | grep '^// \?+build '` + tags=`sed '/^package /q' < $f | grep '^// *+build '` omatch=true first=true match=false