diff options
| author | Russ Cox <rsc@golang.org> | 2010-08-18 10:03:01 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-08-18 10:03:01 -0400 |
| commit | 31339c32244a58263dd2f375d0c32d5f0ac596e5 (patch) | |
| tree | 7f702a1e88e14dedb5b569e2be97684e13253c16 | |
| parent | 3bf656327ec2776027183e85b6e51175ba7040d9 (diff) | |
| download | go-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.go | 4 |
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 |
