diff options
| author | Mike McQuaid | 2013-05-11 12:18:25 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-05-11 12:18:25 +0100 |
| commit | 646150ade992c0af25c2d6ca906b436c6fda025d (patch) | |
| tree | 301b1d59187712830fef71e71a1b4de8ee09c0fb /Library/ENV | |
| parent | 8e2cce64a7e2c9648956c5bb0b51103827f5c501 (diff) | |
| download | homebrew-646150ade992c0af25c2d6ca906b436c6fda025d.tar.bz2 | |
Fix --build-bottle CFLAGS.
The CFLAGS were previously not generic enough.
References #18944.
References #19179.
Diffstat (limited to 'Library/ENV')
| -rwxr-xr-x | Library/ENV/4.3/cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 85f57817d..3d6241c1f 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -148,17 +148,22 @@ class Cmd args end def cflags - if cccfg? 'Ob' - %w{-mtune=generic -Oz} - elsif cccfg? 'O' - args = %w{-pipe -w -Os} - args << '-march=native' if tool =~ /clang/ - args += %w{-arch i386 -arch x86_64} if cccfg? 'u' - args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/ - args + return [] unless cccfg? 'O' + + args = %w{-pipe -w -Os} + + # When bottling use the oldest supported CPU type. + if cccfg? 'bi6' + args << '-march=core2' + elsif cccfg? 'bi' + args << '-march=prescott' else - [] + args << '-march=native' if tool =~ /clang/ end + + args += %w{-arch i386 -arch x86_64} if cccfg? 'u' + args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/ + args end def syslibpath # We reject brew's lib as we explicitly add this as a -L flag, thus it |
