aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index d87825dbe..4f0eebf27 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -175,6 +175,15 @@ module HomebrewEnvExtension
append_to_cflags '-m64'
ENV['LDFLAGS'] += '-arch x86_64'
end
+ # i386 and x86_64 only, no PPC
+ def universal_binary
+ append_to_cflags '-arch i386 -arch x86_64'
+ if self['CFLAGS'].include? '-O4'
+ # O4 seems to cause the build to fail
+ remove_from_cflags '-O4'
+ append_to_cflags '-O3'
+ end
+ end
def prepend key, value, separator = ' '
unless self[key].to_s.empty?