From 0ec7e3928734cab72e29e5e5dc6ebf558f18312b Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 20 Mar 2014 15:20:27 -0700 Subject: 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. --- Library/Homebrew/extend/ENV/std.rb | 3 +++ Library/Homebrew/extend/ENV/super.rb | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'Library') 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", '' -- cgit v1.2.3