public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@golang.org>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: "Matthew R. Wilson" <mwilson@mattwilson.org>,
	gcc-help <gcc-help@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: Re: Error when building gcc w/ Go language on Solaris
Date: Tue, 19 Apr 2022 12:50:41 -0700	[thread overview]
Message-ID: <CAOyqgcXkneaUagsWS04mMNEr32YVuw7B+E8nSW0sm0Z6ZFw4jA@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTYN9yUaOqvdw5oPuMzV5nSkhAAw0WD_zHHv-YwVXx2Wg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Tue, Apr 19, 2022 at 6:36 AM Jonathan Wakely <jwakely.gcc@gmail.com> 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

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1629 bytes --]

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

      reply	other threads:[~2022-04-19 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16  5:39 Matthew R. Wilson
2022-04-16  6:33 ` Jonathan Wakely
2022-04-16 19:24   ` Matthew R. Wilson
2022-04-16 19:41     ` Jonathan Wakely
2022-04-16 19:47       ` Marc Glisse
2022-04-16 23:17         ` Jonathan Wakely
2022-04-17  0:38       ` Ian Lance Taylor
2022-04-17  8:23         ` Jonathan Wakely
2022-04-19 13:36           ` Jonathan Wakely
2022-04-19 19:50             ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOyqgcXkneaUagsWS04mMNEr32YVuw7B+E8nSW0sm0Z6ZFw4jA@mail.gmail.com \
    --to=iant@golang.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gofrontend-dev@googlegroups.com \
    --cc=jwakely.gcc@gmail.com \
    --cc=mwilson@mattwilson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).