diff options
| author | Eugene Ray | 2011-08-28 12:11:46 -0700 |
|---|---|---|
| committer | Max Howell | 2011-08-31 11:16:56 +0100 |
| commit | b6fa7ebcca5fe0e9f0f0efe75c4a3a5e92b3a70b (patch) | |
| tree | c78586dac4b848379656b91ee3aef5ce8330bd11 | |
| parent | 27fd2d7a7024b8afcf297e6e3aa3a930cad992c7 (diff) | |
| download | brew-b6fa7ebcca5fe0e9f0f0efe75c4a3a5e92b3a70b.tar.bz2 | |
Fix Xcode 4.2 cc compiles
It seems like latest build of Xcode 4.2 doesn't create "-4.2" links in /usr/bin. Because of this recipes fail with "configure: error: C compiler cannot create executables" error.
Closes Homebrew/homebrew#7254.
Closes Homebrew/homebrew#7276.
Signed-off-by: Max Howell <max@methylblue.com>
Amended to work as intended, since /usr/bin/cc is actually since Xcode 4.
Amended commit message. First line must be less than 72 characters! :P
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 38852b817..21c841cab 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -127,6 +127,10 @@ module HomebrewEnvExtension if MacOS.xcode_version < '4' self['CC'] = '/usr/bin/cc' self['CXX'] = '/usr/bin/c++' + elsif MacOS.xcode_version >= '4.2' + # Apple stopped adding the -4.2 suffixes + self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/gcc" + self['CXX'] = "#{MacOS.xcode_prefix}/usr/bin/g++" else # With Xcode4 cc, c++, gcc and g++ are actually symlinks to llvm-gcc self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/gcc-4.2" |
