aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/ENV/shared.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/extend/ENV/shared.rb')
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb
index 8208d185d..9225b997f 100644
--- a/Library/Homebrew/extend/ENV/shared.rb
+++ b/Library/Homebrew/extend/ENV/shared.rb
@@ -1,17 +1,18 @@
-require 'formula'
+require "formula"
+require "compilers"
module SharedEnvExtension
+ include CompilerConstants
+
CC_FLAG_VARS = %w{CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS}
FC_FLAG_VARS = %w{FCFLAGS FFLAGS}
- # Update these every time a new GNU GCC branch is released
- GNU_GCC_VERSIONS = (3..9)
- GNU_GCC_REGEXP = /gcc-(4\.[3-9])/
-
- COMPILER_SYMBOL_MAP = { 'gcc-4.0' => :gcc_4_0,
- 'gcc-4.2' => :gcc,
- 'llvm-gcc' => :llvm,
- 'clang' => :clang }
+ COMPILER_SYMBOL_MAP = {
+ "gcc-4.0" => :gcc_4_0,
+ "gcc-4.2" => :gcc,
+ "llvm-gcc" => :llvm,
+ "clang" => :clang,
+ }
COMPILERS = COMPILER_SYMBOL_MAP.values +
GNU_GCC_VERSIONS.map { |n| "gcc-4.#{n}" }