libgo: handle go1.10+ correctly in match.sh
authorNikhil Benesch <nikhil.benesch@gmail.com>
Wed, 7 Oct 2020 05:14:49 +0000 (01:14 -0400)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Oct 2020 19:25:37 +0000 (12:25 -0700)
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
libgo/match.sh
libgo/testsuite/gotest

index c5c02aa2392bedc140c9f752aae9d8eaef1af80d..15f01a0519ba2be1268b061a96bf2ffbacc19a4b 100644 (file)
@@ -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.
index 6f7b368f8bfd0151f16036e3edd042a80478c332..04db8d2c0d2a8f0ac5d83df8452f3dbf9a5d667a 100755 (executable)
@@ -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
                                ;;
                            "!"*)
index 5bb27ec1631a7d97b6241d22f41d82d7c1b4b077..0fd64194360e2fa5a3832f05b134ae044a83e219 100755 (executable)
@@ -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
                                ;;
                            "!"*)