diff options
author | Brian Jensen <Jensen.J.Brian@gmail.com> | 2013-11-11 20:13:14 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-05 15:41:32 (GMT) |
commit | 1d24a83365c2360c064563c15cb09ec8e5f6670a (patch) | |
tree | cdfb508a81090c1cb258ef1cf04a66a21a1ae59d /configure | |
parent | 085f851bd8431a30bc84ee20bdb5c5aa51949f4e (diff) | |
download | Qt-1d24a83365c2360c064563c15cb09ec8e5f6670a.zip Qt-1d24a83365c2360c064563c15cb09ec8e5f6670a.tar.gz Qt-1d24a83365c2360c064563c15cb09ec8e5f6670a.tar.bz2 |
Enable building with clang / libc++ on OS X 10.9 Mavericks
A minimalistic change to enable building with clang / libc++ on OS X
10.9 Mavericks. The configure script now avoids overriding build
settings when using clang/libc++. Added a new build configuration with
settings specific to clang/libc++ on OS X.
Task-number: QTBUG-34652
Change-Id: Iaedaff7c06e9818a5f2ee0d6db93fbe3b2e65e28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 89 |
1 files changed, 54 insertions, 35 deletions
@@ -4998,7 +4998,16 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; done fi if [ "$BUILD_ON_MAC" = "yes" ]; then - echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile" + case "$PLATFORM" in + *macx-clang-libc++) + # Avoid overriding the default configuration settings when building with clang/libc++ + ;; + *) + # For all other configurations require a minimum of 10.5 + echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile" + ;; + esac + echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile" EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)" @@ -7181,14 +7190,17 @@ fi # set the global Mac deployment target. This is overridden on an arch-by-arch basis # in some cases, see code further down case "$PLATFORM,$CFG_MAC_COCOA" in - macx*,yes) - # Cocoa - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5 - ;; - macx*,no) - # gcc, Carbon - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4 - ;; +*macx-clang-libc++,yes) + # Avoid overriding the default configuration setting when building with clang/libc++ + ;; +macx*,yes) + # Cocoa + QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5 + ;; +macx*,no) + # gcc, Carbon + QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4 + ;; esac # disable Qt 3 support on VxWorks, Symbian and INTEGRITY @@ -7931,32 +7943,39 @@ fi # On Mac, set the minimum deployment target for the different architechtures # using the Xarch compiler option when supported (10.5 and up). On 10.4 the # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET -# env. variable. -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then - if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then - QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" - QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" - QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4" - fi - if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4" - fi - if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then - QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" - fi - if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5" - fi +# env. variable. +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ]; then + case "$PLATFORM" in + *macx-clang-libc++) + # Avoid overriding the default settings when building clang/libc++. + ;; + *) + if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then + QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" + QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" + QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4" + fi + if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4" + fi + if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then + QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" + fi + if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5" + fi + ;; + esac fi #------------------------------------------------------------------------------- |