libgo: don't use \? in grep pattern

It's not supported by Solaris grep.  Just use * instead; it matches
more but it shouldn't matter.

Fixes https://gcc.gnu.org/PR91764

Change-Id: Id009211ff476c15359394522d2eb37a36aed26c0
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/195238
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/libgo/match.sh b/libgo/match.sh
index c8fb960..281acf7 100755
--- a/libgo/match.sh
+++ b/libgo/match.sh
@@ -135,7 +135,7 @@
 
     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
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 9d46916..4f1a2f8 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -326,7 +326,7 @@
 	    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