diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2012-01-23 12:54:38 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 14:47:10 +0100 |
commit | 9ce5a0671a50fd04677506b869801d4ce5345acb (patch) | |
tree | f6be644a490a4bb1d76490aabe972d8c80a51c73 | |
parent | 1196b70cf25762f7c8c278d31ae814e776503bd3 (diff) |
Set macosx-version-min in common Mac OS X mkspec instead of configure
When set in configure it would be written to .qmake.cache and would only
apply when building Qt. We then had an override (that was also out of
sync, version-wise) in the g++ mkspec, which would also apply to apps
building agains Qt. This override did howerver not apply when using
the Clang mkspec.
We now move setting macosx-version-min to the common macx mkspec, shared
by both g++ and Clang, which will apply both when building Qt and when
building something against Qt. The latter since an application built
against Qt will not deploy on versions of Mac OS earlier than 10.6
anyways, so we might as well always set the minimum-version.
The modifications to the mkspecs will result in macosx-version-min
being passed twice when compiling qmake, as configure writes its own
makefiles and the mkspec parsing in configure has a bug where it will
lazily evaluate qmake-variables instead of evaluating them inline. This
is not a problem, and can be fixed in a later patch if seen fit.
Change-Id: Ib29503ad00a9dc00e0a50b0dbd9459e89a20dfbd
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | mkspecs/common/g++-macx.conf | 3 | ||||
-rw-r--r-- | mkspecs/common/gcc-base-macx.conf | 4 |
3 files changed, 3 insertions, 12 deletions
@@ -7319,14 +7319,6 @@ if [ "$CFG_EXCEPTIONS" = "no" ]; then QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off" fi -# Set the minimum deployment target. -if [ "$BUILD_ON_MAC" = "yes" ]; then - QMakeVar add QMAKE_CFLAGS "-mmacosx-version-min=10.6" - QMakeVar add QMAKE_CXXFLAGS "-mmacosx-version-min=10.6" - QMakeVar add QMAKE_LFLAGS "-mmacosx-version-min=10.6" - QMakeVar add QMAKE_OBJECTIVE_CFLAGS "-mmacosx-version-min=10.6" -fi - case "$COMPILER" in g++*) # GNU C++ diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf index 22511573c1..acce2fe14e 100644 --- a/mkspecs/common/g++-macx.conf +++ b/mkspecs/common/g++-macx.conf @@ -16,9 +16,6 @@ QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g $$QMAKE_CFLAGS_DWARF2 QMAKE_LFLAGS_STATIC_LIB += -all_load -QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.5 -QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.5 - QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 QMAKE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 diff --git a/mkspecs/common/gcc-base-macx.conf b/mkspecs/common/gcc-base-macx.conf index 79f6c11843..1e51fbd08f 100644 --- a/mkspecs/common/gcc-base-macx.conf +++ b/mkspecs/common/gcc-base-macx.conf @@ -12,12 +12,14 @@ include(gcc-base.conf) QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4 +QMAKE_CFLAGS += -mmacosx-version-min=10.6 QMAKE_CFLAGS_X86 += -arch i386 QMAKE_CFLAGS_X86_64 += -arch x86_64 QMAKE_CFLAGS_PPC += -arch ppc QMAKE_CFLAGS_PPC_64 += -arch ppc64 QMAKE_CFLAGS_DWARF2 += -gdwarf-2 +QMAKE_CXXFLAGS += -mmacosx-version-min=10.6 QMAKE_CXXFLAGS_X86 += $$QMAKE_CFLAGS_X86 QMAKE_CXXFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 QMAKE_CXXFLAGS_PPC += $$QMAKE_CFLAGS_PPC @@ -35,12 +37,12 @@ QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 +QMAKE_LFLAGS += -headerpad_max_install_names -mmacosx-version-min=10.6 QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86 QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC QMAKE_LFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64 -QMAKE_LFLAGS += -headerpad_max_install_names QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace |