mirror of
https://github.com/golang/go
synced 2024-11-02 08:01:26 +00:00
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
This commit is contained in:
parent
3bf656327e
commit
31339c3224
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue