aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb
index 31904c280..d0102f520 100644
--- a/Library/Homebrew/extend/ENV/shared.rb
+++ b/Library/Homebrew/extend/ENV/shared.rb
@@ -98,9 +98,7 @@ module SharedEnvExtension
end
end
elsif ARGV.include? '--use-gcc'
- gcc_installed = Formula.factory('apple-gcc42').installed? rescue false
- # fall back to something else on systems without Apple gcc
- if MacOS.locate('gcc-4.2') || gcc_installed
+ if MacOS.locate("gcc-4.2") || HOMEBREW_PREFIX.join("opt/apple-gcc42/bin/gcc-4.2").exist?
:gcc
else
raise "gcc-4.2 not found!"