[qt5-base] fix static init fiasco and fix debug dll's not being copied (#12153)

This commit is contained in:
Alexander Neumann 2020-06-30 01:33:19 +02:00 committed by GitHub
parent 1f01a1fd25
commit 3b275f5138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 4 deletions

View File

@ -1,5 +1,5 @@
Source: qt5-base
Version: 5.12.8-5
Version: 5.12.8-6
Homepage: https://www.qt.io/
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows)

View File

@ -101,9 +101,7 @@ function(qt_build_submodule SOURCE_PATH)
endif()
#This should be removed if somehow possible
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/tools/qt5/bin")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/tools/qt5/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin")
set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}")
set(CURRENT_INSTALLED_DIR "./../../../.." ) # Making the qt.conf relative and not absolute
configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_debug.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/qt.conf) # This makes the tools at least useable for release

View File

@ -0,0 +1,28 @@
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index 3879b48..c380893 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -149,19 +149,16 @@
// End of qtools_p.h implementation
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
-
const QArrayData QArrayData::shared_null[2] = {
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null
- /* zero initialized terminator */};
+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */
+};
static const QArrayData qt_array[3] = {
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared empty
{ { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty
- /* zero initialized terminator */};
-
-QT_WARNING_POP
+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */
+};
static const QArrayData &qt_array_empty = qt_array[0];
static const QArrayData &qt_array_unsharable_empty = qt_array[1];

View File

@ -0,0 +1,28 @@
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index 3879b48..c380893 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -46,19 +46,17 @@
QT_BEGIN_NAMESPACE
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
-
const QArrayData QArrayData::shared_null[2] = {
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null
- /* zero initialized terminator */};
+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */
+ };
static const QArrayData qt_array[3] = {
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared empty
{ { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty
- /* zero initialized terminator */};
+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */
+ };
-QT_WARNING_POP
static const QArrayData &qt_array_empty = qt_array[0];
static const QArrayData &qt_array_unsharable_empty = qt_array[1];

View File

@ -19,12 +19,14 @@ if("latest" IN_LIST FEATURES)
patches/Qt5BasicConfig_latest.patch
patches/Qt5PluginTarget_latest.patch
patches/create_cmake.patch
patches/8c44d70_latest.diff # Fix for MSVC static init fiasco.
)
else()
set(PATCHES
patches/Qt5BasicConfig.patch
patches/Qt5PluginTarget.patch
patches/prl_parser.patch # Modified backport of the prl parser from Qt5.14.1 without using QMAKE_PRL_LIBS_FOR_CMAKE
patches/8c44d70_lts.diff # Fix for MSVC static init fiasco.
)
endif()