runtime: don't build test files that use SetCgoTraceback for gccgo
The gofrontend doesn't support the runtime.SetCgoTraceback function,
which is specifically for handling mixed Go and C tracebacks.
Use a build tag to avoid compiling the runtime/testdata/testprogcgo
files that refer to SetCgoTraceback. These files are not currently
compiled anyhow, but they will be with a future gotools patch.
Change-Id: I016c5eb21503c49aefa16727b023c7381f2c0d18
Reviewed-on: https://go-review.googlesource.com/46452
Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/libgo/go/runtime/testdata/testprogcgo/pprof.go b/libgo/go/runtime/testdata/testprogcgo/pprof.go
index 4460b93..c4fde02 100644
--- a/libgo/go/runtime/testdata/testprogcgo/pprof.go
+++ b/libgo/go/runtime/testdata/testprogcgo/pprof.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !gccgo
+
package main
// Run a slow C function saving a CPU profile.
diff --git a/libgo/go/runtime/testdata/testprogcgo/raceprof.go b/libgo/go/runtime/testdata/testprogcgo/raceprof.go
index fe624c5..466a367 100644
--- a/libgo/go/runtime/testdata/testprogcgo/raceprof.go
+++ b/libgo/go/runtime/testdata/testprogcgo/raceprof.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build linux,amd64
+// +build !gccgo
package main
diff --git a/libgo/go/runtime/testdata/testprogcgo/threadpprof.go b/libgo/go/runtime/testdata/testprogcgo/threadpprof.go
index 3da8296..bec4ef5 100644
--- a/libgo/go/runtime/testdata/testprogcgo/threadpprof.go
+++ b/libgo/go/runtime/testdata/testprogcgo/threadpprof.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build !plan9,!windows
+// +build !gccgo
package main
diff --git a/libgo/go/runtime/testdata/testprogcgo/traceback.go b/libgo/go/runtime/testdata/testprogcgo/traceback.go
index 2a023f6..d21990e 100644
--- a/libgo/go/runtime/testdata/testprogcgo/traceback.go
+++ b/libgo/go/runtime/testdata/testprogcgo/traceback.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !gccgo
+
package main
// This program will crash.
diff --git a/libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go b/libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go
index 51fa4ad..3940a77 100644
--- a/libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go
+++ b/libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go
@@ -4,6 +4,8 @@
// The __attribute__((weak)) used below doesn't seem to work on Windows.
+// +build !gccgo
+
package main
// Test the context argument to SetCgoTraceback.
diff --git a/libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c b/libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c
index 900cada..f02b7ca 100644
--- a/libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c
+++ b/libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c
@@ -5,6 +5,8 @@
// The C definitions for tracebackctxt.go. That file uses //export so
// it can't put function definitions in the "C" import comment.
+// +build !gccgo
+
#include <stdlib.h>
#include <stdint.h>