]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/race: support freebsd
authorDmitriy Vyukov <dvyukov@google.com>
Sat, 21 Jun 2014 00:20:56 +0000 (20:20 -0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sat, 21 Jun 2014 00:20:56 +0000 (20:20 -0400)
All tests pass except one test in regexp package.

LGTM=iant
R=golang-codereviews, iant, dave
CC=golang-codereviews
https://golang.org/cl/107270043

src/cmd/go/build.go
src/cmd/go/doc.go
src/pkg/runtime/race/race.go
src/pkg/runtime/race/race_freebsd_amd64.syso [new file with mode: 0644]

index 3645f1c2d5f0e5d55d4881be3021e9d33469383a..1dc13cf068dc0c04104fe966ac09977d04de9838 100644 (file)
@@ -64,7 +64,7 @@ and test commands:
                The default is the number of CPUs available.
        -race
                enable data race detection.
-               Supported only on linux/amd64, darwin/amd64 and windows/amd64.
+               Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
        -v
                print the names of packages as they are compiled.
        -work
@@ -2556,8 +2556,8 @@ func raceInit() {
        if !buildRace {
                return
        }
-       if goarch != "amd64" || goos != "linux" && goos != "darwin" && goos != "windows" {
-               fmt.Fprintf(os.Stderr, "go %s: -race is only supported on linux/amd64, darwin/amd64 and windows/amd64\n", flag.Args()[0])
+       if goarch != "amd64" || goos != "linux" && goos != "freebsd" && goos != "darwin" && goos != "windows" {
+               fmt.Fprintf(os.Stderr, "go %s: -race is only supported on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64\n", flag.Args()[0])
                os.Exit(2)
        }
        buildGcflags = append(buildGcflags, "-race")
index 9840804ce74c9e81e7ae971b34ed550a2b6974a1..52737f9f8b540b4330e768a846e615bf3db2f934 100644 (file)
@@ -82,7 +82,7 @@ and test commands:
                The default is the number of CPUs available.
        -race
                enable data race detection.
-               Supported only on linux/amd64, darwin/amd64 and windows/amd64.
+               Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
        -v
                print the names of packages as they are compiled.
        -work
index e53cacf4a074f5f19c1fd6f8f6d3bfb1a7f50be1..3c297e84b24a4217c92eb296d1190ae279b611fa 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build race,linux,amd64 race,darwin,amd64 race,windows,amd64
+// +build race,linux,amd64 race,freebsd,amd64 race,darwin,amd64 race,windows,amd64
 
 package race
 
diff --git a/src/pkg/runtime/race/race_freebsd_amd64.syso b/src/pkg/runtime/race/race_freebsd_amd64.syso
new file mode 100644 (file)
index 0000000..b25d868
Binary files /dev/null and b/src/pkg/runtime/race/race_freebsd_amd64.syso differ