From: Russ Cox Date: Wed, 18 Aug 2010 14:03:01 +0000 (-0400) Subject: cgo: fix build: use $GCC, not $CC X-Git-Tag: weekly.2010-08-25~37 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=31339c32244a58263dd2f375d0c32d5f0ac596e5;p=gostls13.git 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 --- 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