diff options
author | Nikhil Benesch <nikhil.benesch@gmail.com> | 2020-10-07 01:14:49 -0400 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-07 12:25:37 -0700 |
commit | 89d3af5ef7e313efd7a5e88a4c629b4704cfe976 (patch) | |
tree | e02c1ce37dc158343930dfca0a102cc648166f8a | |
parent | 1e247c60df52e93c9814a3a1789a63bc07aa4542 (diff) | |
download | gcc-89d3af5ef7e313efd7a5e88a4c629b4704cfe976.zip gcc-89d3af5ef7e313efd7a5e88a4c629b4704cfe976.tar.gz gcc-89d3af5ef7e313efd7a5e88a4c629b4704cfe976.tar.bz2 |
libgo: handle go1.10+ correctly in match.sh
match.sh was not correctly handling build constraints for Go versions
that have a two-digit suffix, like "go1.10".
The same issue will arise with Go 1.100, but that is a long ways off.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260077
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rwxr-xr-x | libgo/match.sh | 8 | ||||
-rwxr-xr-x | libgo/testsuite/gotest | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c5c02aa..15f01a0 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -613e530547549f4220c4571ea913acbe5fa56f72 +762b74a56f7ca102a5b8da1c9d0ffce592caa46b The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/match.sh b/libgo/match.sh index 6f7b368..04db8d2 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -151,18 +151,18 @@ for f in $gofiles; do fi match=false ;; - $goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9]) + $goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9] | go1.[0-9][0-9]) match=true ;; - "!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9]) + "!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9]) ;; *,*) cmatch=true for ctag in `echo $tag | sed -e 's/,/ /g'`; do case $ctag in - $goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9]) + $goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9] | go1.[0-9][0-9]) ;; - "!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9]) + "!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9]) cmatch=false ;; "!"*) diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 5bb27ec..0fd6419 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -342,18 +342,18 @@ x) fi match=false ;; - $goos | $goarch | cgo | gccgo | go1.[0-9]) + $goos | $goarch | cgo | gccgo | go1.[0-9] | go1.[0-9][0-9]) match=true ;; - "!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9]) + "!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9]) ;; *,*) cmatch=true for ctag in `echo $tag | sed -e 's/,/ /g'`; do case $ctag in - $goos | $goarch | cgo | gccgo | go1.[0-9]) + $goos | $goarch | cgo | gccgo | go1.[0-9] | go1.[0-9][0-9]) ;; - "!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9]) + "!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9]) cmatch=false ;; "!"*) |