diff options
| author | Max Howell | 2012-09-03 11:56:29 -0400 |
|---|---|---|
| committer | Max Howell | 2012-09-03 15:12:31 -0400 |
| commit | 9f99535d317e3aa2b04bcd8e2c020339eccc85f4 (patch) | |
| tree | 23eb54de7f6e3a2e6d5993e1ef3e0ed3a8ea85ea /Library/Homebrew | |
| parent | 849151536a456ad34947dee48aba7fa7a4d33cc6 (diff) | |
| download | homebrew-9f99535d317e3aa2b04bcd8e2c020339eccc85f4.tar.bz2 | |
Set CC and CXX with superenv (again)
It was dumb to have make call different compilers to configure depending on the `servile?` flag. This is not a route to reliability.
Instead now we set CC (formula that break if CC is set like Jack be damned, their build-systems are just plain broken and should not be supported). When cc is called we examine HOMEBREW_CC, otherwise we instantiate the tool that was called, just like the formula's build-system will expect.
Fixes #14659 (though the build fails later for me, with the same error for stdenv and superenv).
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/superenv.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index dad217be5..8983b1801 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -41,7 +41,8 @@ class << ENV def setup_build_environment reset check - ENV['LD'] = 'cc' + ENV['CC'] = ENV['LD'] = 'cc' + ENV['CXX'] = 'c++' ENV['MAKEFLAGS'] ||= "-j#{determine_make_jobs}" ENV['PATH'] = determine_path ENV['PKG_CONFIG_PATH'] = determine_pkg_config_path @@ -198,13 +199,16 @@ class << ENV end alias_method :j1, :deparallelize def gcc - ENV['HOMEBREW_CC'] = "gcc" + ENV['CC'] = ENV['HOMEBREW_CC'] = "gcc" + ENV['CXX'] = "g++" end def llvm - ENV['HOMEBREW_CC'] = "llvm-gcc" + ENV['CC'] = ENV['HOMEBREW_CC'] = "llvm-gcc" + ENV['CXX'] = "g++" end def clang - ENV['HOMEBREW_CC'] = "clang" + ENV['CC'] = ENV['HOMEBREW_CC'] = "clang" + ENV['CXX'] = "clang++" end def make_jobs ENV['MAKEFLAGS'] =~ /-\w*j(\d)+/ |
