diff options
| author | Max Howell | 2009-10-19 12:44:30 +0100 |
|---|---|---|
| committer | Max Howell | 2009-10-19 13:48:33 +0100 |
| commit | 9d5e0cea34a32472db2d89a357aadf434a7f0b33 (patch) | |
| tree | cad8a76c40e59a0dc004c6cb5c33b3ea3e41eb92 /Library | |
| parent | 3cbf8d7d621e3c0ddc43c8932adf1ab8b5d3c25e (diff) | |
| download | homebrew-9d5e0cea34a32472db2d89a357aadf434a7f0b33.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? |
