This libgo patch fixes the cmd/g TestScript test to preserve the CC
environment variable for TestScript child processes, so that tests
that use cgo will act as expected.  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 269216)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-558fcb7bf2a6b78bdba87f20a8a4a95d27125d74
+9c1859b8e97242b0e697a3aaa39a4da5e6172e74
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/cmd/go/script_test.go
===================================================================
--- libgo/go/cmd/go/script_test.go      (revision 269196)
+++ libgo/go/cmd/go/script_test.go      (working copy)
@@ -83,13 +83,12 @@ type backgroundCmd struct {
 }
 
 var extraEnvKeys = []string{
-       "SYSTEMROOT",      // must be preserved on Windows to find DLLs; 
golang.org/issue/25210
-       "LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared 
libraries
-
-       // For gccgo testing.
-       "GO_TESTING_GOTOOLS",
-       "GCCGO",
-       "GCCGOTOOLDIR",
+       "SYSTEMROOT",         // must be preserved on Windows to find DLLs; 
golang.org/issue/25210
+       "LD_LIBRARY_PATH",    // must be preserved on Unix systems to find 
shared libraries
+       "CC",                 // don't lose user settings when invoking cgo
+       "GO_TESTING_GOTOOLS", // for gccgo testing
+       "GCCGO",              // for gccgo testing
+       "GCCGOTOOLDIR",       // for gccgo testing
 }
 
 // setup sets up the test execution temporary directory and environment.

Reply via email to