The libgo library doesn't provide runtime.SetCgoTraceback, which is used by the gc toolchain to collect combined C/Go tracebacks. Since gccgo uses the normal C ABI, the function is not necessary for gccgo, and it is difficult to implement. This patch changes the runtime tests so that the ones that require SetCgoTraceback are not built for gccgo. Those tests are not built today, but they will be soon. Patch bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 249555) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -bbc4f30a027ee09475d08aa4aeed1f2f7067e2e9 +e017833e4ce4a3bc3ba02eac4351b15c86157ec0 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/runtime/testdata/testprogcgo/pprof.go =================================================================== --- libgo/go/runtime/testdata/testprogcgo/pprof.go (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/pprof.go (working copy) @@ -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. Index: libgo/go/runtime/testdata/testprogcgo/raceprof.go =================================================================== --- libgo/go/runtime/testdata/testprogcgo/raceprof.go (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/raceprof.go (working copy) @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // +build linux,amd64 +// +build !gccgo package main Index: libgo/go/runtime/testdata/testprogcgo/threadpprof.go =================================================================== --- libgo/go/runtime/testdata/testprogcgo/threadpprof.go (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/threadpprof.go (working copy) @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // +build !plan9,!windows +// +build !gccgo package main Index: libgo/go/runtime/testdata/testprogcgo/traceback.go =================================================================== --- libgo/go/runtime/testdata/testprogcgo/traceback.go (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/traceback.go (working copy) @@ -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. Index: libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go =================================================================== --- libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/tracebackctxt.go (working copy) @@ -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. Index: libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c =================================================================== --- libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c (revision 249205) +++ libgo/go/runtime/testdata/testprogcgo/tracebackctxt_c.c (working copy) @@ -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>