From 7c4f06669cae5e342ea40086b133c4bbd553354f Mon Sep 17 00:00:00 2001 From: quarnster Date: Wed, 28 Mar 2012 22:14:18 +0300 Subject: Fix Qt sometimes unintentionally using LLVM. Moved setting ENV['LD'] = ENV['CXX'] to after ENV.llvm is (possibly) set. Otherwise ENV['LD'] might end up as llvm-gcc rather than the expected CXX version. Verified that this fixed the issue I had installing QT on my machine. Fixes issue #11202. See also #11198. By the comment above where ENV.llvm is set, maybe it was supposed to be using clang rather than llvm-gcc though because my Xcode is 3.2.6. clang is "Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)", and llvm-gcc is "i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)". In any case, moving these two lines made it compile and install fine on my system. Fixes #11261, #11202, #11198. --- Library/Formula/qt.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb index 4e8d3cd76..76d10d382 100644 --- a/Library/Formula/qt.rb +++ b/Library/Formula/qt.rb @@ -33,9 +33,6 @@ class Qt < Formula end def install - # Needed for Qt 4.8.0 due to attempting to link moc with gcc. - ENV['LD'] = ENV['CXX'] - ENV.x11 ENV.append "CXXFLAGS", "-fvisibility=hidden" args = ["-prefix", prefix, @@ -84,6 +81,9 @@ class Qt < Formula # shipped with Xcode 4.3+ ENV.llvm if MacOS.clang_version.to_f <= 3.1 + # Needed for Qt 4.8.0 due to attempting to link moc with gcc. + ENV['LD'] = ENV['CXX'] + system "./configure", *args system "make" ENV.j1 -- cgit v1.2.3