aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2014-03-20 15:20:27 -0700
committerMisty De Meo2014-03-28 17:02:14 -0700
commit0ec7e3928734cab72e29e5e5dc6ebf558f18312b (patch)
treec596096b0a267f64acfbd9b1f8cf48924d59f109
parent05d759606a14bb10adcfca2e5a988badf432a6f9 (diff)
downloadbrew-0ec7e3928734cab72e29e5e5dc6ebf558f18312b.tar.bz2
Add ENV.refurbish_args helper
Rationale: our arg refurbishment is normally only turned on when called via the `make` wrapper, for compatibility reasons. However, there are numberous places we'd like this to be turned on elsewhere, like software that builds via `python setup.py` where bad flags from the system python can be pulled in. This helper appends 'O' to CCCFG, which enables refurbishment for all calls of the compiler shims.
-rw-r--r--Library/Homebrew/extend/ENV/std.rb3
-rw-r--r--Library/Homebrew/extend/ENV/super.rb4
2 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb
index 71e89a666..c8beee949 100644
--- a/Library/Homebrew/extend/ENV/std.rb
+++ b/Library/Homebrew/extend/ENV/std.rb
@@ -359,4 +359,7 @@ module Stdenv
Hardware::CPU.cores
end
end
+
+ # This method does nothing in stdenv since there's no arg refurbishment
+ def refurbish_args; end
end
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index c9ffb2c72..5ecd46012 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -295,6 +295,10 @@ module Superenv
end
end
+ def refurbish_args
+ append 'HOMEBREW_CCCFG', "O", ''
+ end
+
# m32 on superenv does not add any CC flags. It prevents "-m32" from being erased.
def m32
append 'HOMEBREW_CCCFG', "3", ''