Always use the standard OSX SDK tools
Instead of whatever happens to be in PATH.
Test: port install gcc5; attempt to build host binaries
Change-Id: If4af32596edd6fd3e459c3d574ab0ff495f236ff
diff --git a/cc/compiler.go b/cc/compiler.go
index dc594e3..84ee652 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -262,10 +262,7 @@
flags.LdFlags = config.ClangFilterUnknownCflags(flags.LdFlags)
target := "-target " + tc.ClangTriple()
- var gccPrefix string
- if !ctx.Darwin() {
- gccPrefix = "-B" + filepath.Join(tc.GccRoot(), tc.GccTriple(), "bin")
- }
+ gccPrefix := "-B" + config.ToolPath(tc)
flags.CFlags = append(flags.CFlags, target, gccPrefix)
flags.AsFlags = append(flags.AsFlags, target, gccPrefix)