diff options
| author | Max Howell | 2009-10-19 12:44:30 +0100 |
|---|---|---|
| committer | Max Howell | 2009-10-19 13:48:33 +0100 |
| commit | 595dbc5710a63f277163af8aed1cb19752eece6a (patch) | |
| tree | 23af3b9321af05e417cfcd252e09909cc79ffa6c /Library | |
| parent | 9d290b450255ad8160f2dfc75181bfdd80bbf3b7 (diff) | |
| download | brew-595dbc5710a63f277163af8aed1cb19752eece6a.tar.bz2 | |
ENV.universal_binary
Note, we still don't support PPC, this builds a 32 bit, 64 bit binary.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 9 |
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? |
