aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2014-03-20 15:20:27 -0700
committerMisty De Meo2014-03-28 17:02:14 -0700
commitae62018b6da345f072a0988739728100c11d70ed (patch)
tree8e18735550adc191240a6b4e57da43304dff72a4
parenta4e40ebe99eaf101ee490825dbde609d3b6b072a (diff)
downloadhomebrew-ae62018b6da345f072a0988739728100c11d70ed.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", ''