From a969cc4375186a6875ef450f042dad77f62ee3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 2 Nov 2010 15:23:04 +0100 Subject: Don't use scopes in mkspecs as configure does not support them Configure has very basic parsing of mkspecs where it traverses includes, but assumes that the last seen value is the right one. Since this parsing does not take scopes into account we can't use tricks like isEmpty(). Reviewed-by: ossi --- configure | 2 +- mkspecs/common/clang.conf | 3 +++ mkspecs/common/gcc-base.conf | 5 ++--- mkspecs/common/llvm.conf | 3 +++ mkspecs/linux-llvm/qmake.conf | 2 +- mkspecs/macx-g++40/qmake.conf | 11 ++++++++--- mkspecs/macx-g++42/qmake.conf | 11 ++++++++--- mkspecs/macx-llvm/qmake.conf | 2 +- mkspecs/unsupported/linux-clang/qmake.conf | 2 +- mkspecs/unsupported/macx-clang/qmake.conf | 2 +- 10 files changed, 29 insertions(+), 14 deletions(-) diff --git a/configure b/configure index da48dba..115df87 100755 --- a/configure +++ b/configure @@ -3290,7 +3290,7 @@ else CFG_FRAMEWORK=no fi -QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "\(^\| \)QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1` +QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1` TEST_COMPILER="$CXX" [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf index f8ab0fe..069cdfa 100644 --- a/mkspecs/common/clang.conf +++ b/mkspecs/common/clang.conf @@ -5,6 +5,9 @@ QMAKE_CC = clang QMAKE_CXX = clang++ +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX + CONFIG += clang_pch_style QMAKE_PCH_OUTPUT_EXT = .pch diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 2d8a02f..5ba0c31 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -31,8 +31,7 @@ # you can use the manual test in tests/manual/mkspecs. # -# Allow including configurations to override -isEmpty(QMAKE_CC): QMAKE_CC = gcc +QMAKE_CC = gcc QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M @@ -45,7 +44,7 @@ QMAKE_CFLAGS_STATIC_LIB += -fPIC QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -isEmpty(QMAKE_CXX): QMAKE_CXX = g++ +QMAKE_CXX = g++ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf index 3d66357..86e0ab4 100644 --- a/mkspecs/common/llvm.conf +++ b/mkspecs/common/llvm.conf @@ -5,6 +5,9 @@ QMAKE_CC = llvm-gcc QMAKE_CXX = llvm-g++ +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX + QMAKE_PCH_OUTPUT_EXT = .gch QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf index 17db1bb..46ea2aa 100644 --- a/mkspecs/linux-llvm/qmake.conf +++ b/mkspecs/linux-llvm/qmake.conf @@ -10,6 +10,6 @@ QT += core gui QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) -include(../common/llvm.conf) include(../common/gcc-base-unix.conf) +include(../common/llvm.conf) load(qt_config) diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf index aa10fa2..07663c6 100644 --- a/mkspecs/macx-g++40/qmake.conf +++ b/mkspecs/macx-g++40/qmake.conf @@ -13,11 +13,16 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CC = gcc-4.0 -QMAKE_CXX = g++-4.0 - include(../common/mac.conf) include(../common/gcc-base-macx.conf) include(../common/g++-macx.conf) +QMAKE_CC = gcc-4.0 +QMAKE_CXX = g++-4.0 + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC + load(qt_config) diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf index b2be5ed..3d31305 100644 --- a/mkspecs/macx-g++42/qmake.conf +++ b/mkspecs/macx-g++42/qmake.conf @@ -13,11 +13,16 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CC = gcc-4.2 -QMAKE_CXX = g++-4.2 - include(../common/mac.conf) include(../common/gcc-base-macx.conf) include(../common/g++-macx.conf) +QMAKE_CC = gcc-4.2 +QMAKE_CXX = g++-4.2 + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC + load(qt_config) diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf index 94f9688..d794701 100644 --- a/mkspecs/macx-llvm/qmake.conf +++ b/mkspecs/macx-llvm/qmake.conf @@ -14,8 +14,8 @@ QT += core gui QMAKE_INCREMENTAL_STYLE = sublib include(../common/mac.conf) -include(../common/llvm.conf) include(../common/gcc-base-macx.conf) +include(../common/llvm.conf) QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/unsupported/linux-clang/qmake.conf b/mkspecs/unsupported/linux-clang/qmake.conf index 65eba7b..6b63b7a 100644 --- a/mkspecs/unsupported/linux-clang/qmake.conf +++ b/mkspecs/unsupported/linux-clang/qmake.conf @@ -11,8 +11,8 @@ QT += core gui QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) -include(../../common/clang.conf) include(../../common/gcc-base-unix.conf) +include(../../common/clang.conf) QMAKE_LFLAGS += -ccc-gcc-name g++ diff --git a/mkspecs/unsupported/macx-clang/qmake.conf b/mkspecs/unsupported/macx-clang/qmake.conf index aaabf27..3191344 100644 --- a/mkspecs/unsupported/macx-clang/qmake.conf +++ b/mkspecs/unsupported/macx-clang/qmake.conf @@ -10,8 +10,8 @@ QT += core gui QMAKE_INCREMENTAL_STYLE = sublib include(../../common/mac.conf) -include(../../common/clang.conf) include(../../common/gcc-base-macx.conf) +include(../../common/clang.conf) QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- cgit v0.12