cmd/go: preserve CC for TestScript child processes
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Feb 2019 01:11:20 +0000 (01:11 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Feb 2019 01:11:20 +0000 (01:11 +0000)
    Reviewed-on: https://go-review.googlesource.com/c/158838

From-SVN: r269240

gcc/go/gofrontend/MERGE
libgo/go/cmd/go/script_test.go

index d3515f8672ff17652467964c9cd486a7eecec572..d601bb99cff04e4c2d2aa8ad7f18a0ecb47c701c 100644 (file)
@@ -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 1acc61f3b383e97e723e491f75026d03c684e114..3002db767993778b1491b9da6e936851e494941a 100644 (file)
@@ -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.