mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +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".
|
// the environment, otherwise just "gcc".
|
||||||
|
|
||||||
func (p *Package) gccName() (ret string) {
|
func (p *Package) gccName() (ret string) {
|
||||||
if ret = os.Getenv("CC"); ret == "" {
|
if ret = os.Getenv("GCC"); ret == "" {
|
||||||
ret = "gcc"
|
ret = "gcc"
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue