platform := fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)
switch platform {
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x",
- "android/amd64", "android/arm", "android/arm64", "android/386":
+ "android/amd64", "android/arm", "android/arm64", "android/386",
+ "freebsd/amd64":
case "darwin/amd64":
default:
t.Skipf("skipping test because buildmode=pie is not supported on %s", platform)
tg.run("build", "-buildmode=pie", "-o", obj, src)
switch runtime.GOOS {
- case "linux", "android":
+ case "linux", "android", "freebsd":
f, err := elf.Open(obj)
if err != nil {
t.Fatal(err)
} else {
switch platform {
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x",
- "android/amd64", "android/arm", "android/arm64", "android/386":
+ "android/amd64", "android/arm", "android/arm64", "android/386",
+ "freebsd/amd64":
codegenArg = "-shared"
case "darwin/amd64":
codegenArg = "-shared"
case "pie":
switch objabi.GOOS {
case "android", "linux":
- case "darwin":
+ case "darwin", "freebsd":
switch objabi.GOARCH {
case "amd64":
default:
}
func TestRaceProf(t *testing.T) {
- if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
+ if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" {
t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
}
func TestRaceSignal(t *testing.T) {
t.Parallel()
- if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
+ if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" {
t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
}
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,amd64
+// +build linux,amd64 freebsd,amd64
package main
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,amd64
+// +build linux,amd64 freebsd,amd64
package main