* [PATCH] libgo: Fix non-portable sed commands
@ 2022-04-19 18:06 Jonathan Wakely
2022-04-19 19:53 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2022-04-19 18:06 UTC (permalink / raw)
To: gcc-patches; +Cc: Ian Lance Taylor
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(-)
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/Makefile.in b/libgo/Makefile.in
index 7bef5df90d1..22f48a52938 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -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 \
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
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libgo: Fix non-portable sed commands
2022-04-19 18:06 [PATCH] libgo: Fix non-portable sed commands Jonathan Wakely
@ 2022-04-19 19:53 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2022-04-19 19:53 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-19 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 18:06 [PATCH] libgo: Fix non-portable sed commands Jonathan Wakely
2022-04-19 19:53 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).