]> Cypherpunks repositories - gostls13.git/commitdiff
cgo: fix build: use $GCC, not $CC
authorRuss Cox <rsc@golang.org>
Wed, 18 Aug 2010 14:03:01 +0000 (10:03 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 18 Aug 2010 14:03:01 +0000 (10:03 -0400)
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

src/cmd/cgo/gcc.go

index f76212e5898616e57ff75d93fb2a48009263006a..ae3e4de74068ee37acc87ba5de05f194eebdf421 100644 (file)
@@ -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