From 31339c32244a58263dd2f375d0c32d5f0ac596e5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 18 Aug 2010 10:03:01 -0400 Subject: [PATCH] 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 --- src/cmd/cgo/gcc.go | 4 ++-- 1 file 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