From 89d3af5ef7e313efd7a5e88a4c629b4704cfe976 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Wed, 7 Oct 2020 01:14:49 -0400 Subject: [PATCH] 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 --- gcc/go/gofrontend/MERGE | 2 +- libgo/match.sh | 8 ++++---- libgo/testsuite/gotest | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c5c02aa2392..15f01a0519b 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 6f7b368f8bf..04db8d2c0d2 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 5bb27ec1631..0fd64194360 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 ;; "!"*) -- 2.30.2