On Tue, Apr 19, 2022 at 6:36 AM Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > The 'check-tail' target in libgo/Makefile.am does: > > ... | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum > > This doesn't work with Solaris sed (and is documented by Autoconf as > being non-portable). The $ needs to be outside the back-reference > expression: > > ... | sed -n -e 's/.* \(version.*\)$$/\1/p'` >> libgo.sum > > This should be OK to change, because the $ is just an anchor and > doesn't need to be captured. > > More significantly, I see errors like: > > /export/home/jwakely/src/gcc/libgo/match.sh: line 114: ((: go1.13 : > syntax error: invalid arithmetic operator (error token is ".13 ") > > That script uses \+ in a sed script, which is not supported by POSIX > sed, because it's not in the BRE grammar. That seems to be the cause > of the match.sh errors. The attached patch fixes it. Thanks for looking. Committed to mainline like so. Ian
75f7b65d3f775f06be08c5d2a9573b49a4b4b1d5 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 2321f67ca5d..63238715bd0 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -22b0ccda3aa4d16f770a26a3eb251f8da615c318 +99ca6be406a5781be078ff23f45a72b4c84b16e3 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/Makefile.am b/libgo/Makefile.am index e0a1eec52a2..a5d4b6a3525 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -1305,7 +1305,7 @@ check-tail: check-recursive check-multi if test "$$untested" -ne "0"; then \ echo "# of untested testcases $$untested" >> libgo.sum; \ fi; \ - echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \ + echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*\)$$/\1/p'` >> libgo.sum; \ echo >> libgo.log; \ echo "runtest completed at `date`" >> libgo.log; \ if test "$$fail" -ne "0"; then \ diff --git a/libgo/match.sh b/libgo/match.sh index 139d0cdbe64..7ed587ff794 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -100,7 +100,7 @@ fi gobuild() { line=$(echo "$1" | sed -e 's|//go:build ||') - line=$(echo "$line" | sed -e 's/go1\.[0-9]\+/1/g' -e 's/goexperiment\./goexperiment/') + line=$(echo "$line" | sed -e 's/go1\.[0-9][0-9]*/1/g' -e 's/goexperiment\./goexperiment/') line=" $line " wrap='[ ()!&|]' for ones in $goarch $goos $cgotag $cmdlinetag gccgo goexperimentfieldtrack; do