aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-08-18 10:03:01 -0400
committerRuss Cox <rsc@golang.org>2010-08-18 10:03:01 -0400
commit31339c32244a58263dd2f375d0c32d5f0ac596e5 (patch)
tree7f702a1e88e14dedb5b569e2be97684e13253c16
parent3bf656327ec2776027183e85b6e51175ba7040d9 (diff)
downloadgo-31339c32244a58263dd2f375d0c32d5f0ac596e5.tar.xz
cgo: fix build: use $GCC, not $CC
I'm not sure there's a better way. Cgo is juggling two different C compilers. Fixes #1008. R=iant CC=golang-dev https://golang.org/cl/1972044
-rw-r--r--src/cmd/cgo/gcc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index f76212e589..ae3e4de740 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -450,11 +450,11 @@ func (p *Package) rewriteRef(f *File) {
}
}
-// gccName returns the name of the compiler to run. Use CC if set in
+// gccName returns the name of the compiler to run. Use $GCC if set in
// the environment, otherwise just "gcc".
func (p *Package) gccName() (ret string) {
- if ret = os.Getenv("CC"); ret == "" {
+ if ret = os.Getenv("GCC"); ret == "" {
ret = "gcc"
}
return