summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-06-14 11:56:56 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-14 13:45:18 +0200
commitb1a216649ec064412160638dd00195cd47c567aa (patch)
treea4134415a3849cfb857942e698514be9da18924f /mkspecs
parent2e20ae3c1b57169497f6f3904623be4f5e617e12 (diff)
parent1632786f00875d23c7d111cbb29dedaa35c1c8c2 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/android-clang/qmake.conf2
-rw-r--r--mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf2
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in11
-rw-r--r--mkspecs/features/qt_build_config.prf4
-rw-r--r--mkspecs/features/qt_common.prf6
-rw-r--r--mkspecs/features/qt_configure.prf10
-rw-r--r--mkspecs/features/qt_module.prf5
-rw-r--r--mkspecs/features/qt_prefix_build_check.prf21
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf6
9 files changed, 59 insertions, 8 deletions
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index bb02a3639f..8569c08348 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -27,7 +27,7 @@ else: equals(ANDROID_TARGET_ARCH, x86_64): \
QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info
-QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a
+QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++
equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
diff --git a/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf
index 75b6ad7db5..b4a4484594 100644
--- a/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf
+++ b/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf
@@ -20,7 +20,7 @@
# output check that "EGLFS GBM .......... yes" is present, otherwise
# eglfs will not be functional.
#
-# ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ \
+# ./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \
# -device-option CROSS_COMPILE=~/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
# -sysroot ~/raspbian/sysroot \
# -prefix /usr/local/qt5pi -extprefix ~/raspbian/qt5pi -hostprefix ~/raspbian/qt5 \
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index aca8703238..1c4994c30f 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -59,6 +59,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
+ string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries ${CMAKE_CXX_STANDARD_LIBRARIES})
set(_search_paths)
string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
foreach(_flag ${_static_depends})
@@ -66,7 +67,15 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
if(_flag MATCHES \"^-l(.*)$\")
# Handle normal libraries passed as -lfoo
set(_lib \"${CMAKE_MATCH_1}\")
- if(_lib MATCHES \"^pthread$\")
+ foreach(_standard_library ${_standard_libraries})
+ if(_standard_library MATCHES \"^${_lib}(\\.lib)?$\")
+ set(_lib_is_default_linked TRUE)
+ break()
+ endif()
+ endforeach()
+ if (_lib_is_default_linked)
+ unset(_lib_is_default_linked)
+ elseif(_lib MATCHES \"^pthread$\")
find_package(Threads REQUIRED)
list(APPEND _lib_deps Threads::Threads)
else()
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 0c6c10dded..8a7c9c28d3 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -37,8 +37,10 @@ intel_icl {
QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
+load(qt_prefix_build_check)
+
# force_independent can be set externally. prefix_build not.
-!exists($$[QT_HOST_DATA]/.qmake.cache): \
+qtIsPrefixBuild($$[QT_HOST_DATA]): \
CONFIG += prefix_build force_independent
!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent {
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 53a20691ed..c24f2c6062 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -51,6 +51,12 @@ contains(TEMPLATE, .*lib) {
}
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
+ !equals(qt_libdir, $$rplbase/lib) {
+ qtlibdir_replace.match = $$qt_libdir
+ qtlibdir_replace.replace = $$qqt_libdir
+ qtlibdir_replace.CONFIG = path
+ QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace
+ }
}
# The remainder of this file must not apply to host tools/libraries,
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 7c48badfaf..2ac9de266f 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -2517,17 +2517,19 @@ logn("Configure summary:")
logn()
qtConfPrintReport()
+load(qt_prefix_build_check)
+
# final notes for the user
logn()
logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
pfx = $$[QT_INSTALL_PREFIX]
-exists($$pfx/.qmake.cache) {
+qtIsPrefixBuild($$pfx) {
+ logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
+ logn("Qt will be installed into '$$system_path($$pfx)'.")
+} else {
logn("Once everything is built, Qt is installed.")
logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
logn("Note that this build cannot be deployed to other machines or devices.")
-} else {
- logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
- logn("Qt will be installed into '$$system_path($$pfx)'.")
}
logn()
logn("Prior to reconfiguration, make sure you remove any leftovers from")
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 213556904d..cb3707cf8c 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -82,6 +82,11 @@ header_module {
CONFIG += force_qt # Needed for the headers_clean tests.
!lib_bundle: \
CONFIG += qt_no_install_library
+
+ # Allow creation of .prl, .la and .pc files.
+ target.path = $$[QT_INSTALL_LIBS]
+ target.CONFIG += dummy_install
+ INSTALLS += target
} else {
TEMPLATE = lib
}
diff --git a/mkspecs/features/qt_prefix_build_check.prf b/mkspecs/features/qt_prefix_build_check.prf
new file mode 100644
index 0000000000..3f98847de9
--- /dev/null
+++ b/mkspecs/features/qt_prefix_build_check.prf
@@ -0,0 +1,21 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
+defineTest(qtIsPrefixBuild) {
+ prefixdir = $$1
+ # qtbase non-prefix build?
+ exists($$prefixdir/.qmake.cache): \
+ return(false)
+ # top-level non-prefix build?
+ contains(prefixdir, .*/qtbase):exists($$dirname(prefixdir)/.qmake.super): \
+ return(false)
+ return(true)
+}
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index c80f2bfb92..c6c3af3622 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -94,6 +94,12 @@ QMAKE_PREFIX_STATICLIB = lib
QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
QMAKE_AR = emar cqs
+equals(QMAKE_HOST.os, Windows) {
+ QMAKE_AR_CMD = \
+ "$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(subst \\,/,$(OBJECTS)))$$escape_expand(\\n\\t)" \
+ "$(AR) $(DESTDIR)$(TARGET) @$(OBJECTS_DIR)/$(TARGET).rsp"
+}
+
QMAKE_DISTCLEAN += *.html *.js *.wasm
load(qt_config)