libgo: Fix non-portable sed commands
Commit Message
This fixes the libgo build if /usr/bin/sed is found before
/usr/xpg4/bin/sed on Solaris.
Tested sparc-sun-solaris2.11, OK for trunk?
-- >8 --
Solaris sed does not allow '^' and '$' anchors inside groups, and does
not support the '+' meta-character.
ChangeLog:
* libgo/Makefile.am (check-tail): Fix non-portable sed command.
* libgo/Makefile.in: Regenerate.
* libgo/match.sh (gobuild): Fix non-portable sed command.
---
libgo/Makefile.am | 2 +-
libgo/Makefile.in | 2 +-
libgo/match.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Tue, Apr 19, 2022 at 11:06 AM Jonathan Wakely <jwakely@redhat.com> wrote:
>
> This fixes the libgo build if /usr/bin/sed is found before
> /usr/xpg4/bin/sed on Solaris.
>
> Tested sparc-sun-solaris2.11, OK for trunk?
Thanks, already committed based on your earlier e-mail.
Ian
@@ -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 \
@@ -3189,7 +3189,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 \
@@ -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