4310
|
1 This file is part of MXE. See LICENSE.md for licensing information. |
4222
|
2 |
4956
|
3 From 01ee0b5260f1b83a81769132c0705aab05481641 Mon Sep 17 00:00:00 2001 |
4222
|
4 From: Ray Donnelly <mingw.android@gmail.com> |
|
5 Date: Wed, 26 Aug 2015 12:45:43 +0100 |
4900
|
6 Subject: [PATCH 1/5] cmake: Rearrange STATIC vs INTERFACE targets |
4222
|
7 |
|
8 Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) |
|
9 for header-only modules when building Qt5 statically. |
|
10 |
|
11 Source: https://git.io/vzWJz |
|
12 See also: https://github.com/mxe/mxe/issues/1185 |
|
13 |
|
14 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
4900
|
15 index 3ed6dd5889..cc5bc9dc16 100644 |
4222
|
16 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
|
17 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
4735
|
18 @@ -214,12 +214,12 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) |
|
19 list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\") |
4222
|
20 !!ENDIF |
|
21 |
|
22 +!!IF equals(TEMPLATE, aux) |
|
23 + add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) |
|
24 +!!ELSE |
|
25 !!IF !isEmpty(CMAKE_STATIC_TYPE) |
|
26 add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) |
|
27 set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") |
4735
|
28 -!!ELSE |
4222
|
29 -!!IF equals(TEMPLATE, aux) |
|
30 - add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) |
4735
|
31 !!ELSE |
4222
|
32 add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) |
|
33 !!ENDIF |
|
34 -- |
4900
|
35 2.19.1 |
4222
|
36 |
|
37 |
4956
|
38 From 48723a27c10322a9beff2f84422c757df2639edd Mon Sep 17 00:00:00 2001 |
4222
|
39 From: Tony Theodore <tonyt@logyst.com> |
|
40 Date: Sat, 16 Jul 2016 20:31:07 +1000 |
4900
|
41 Subject: [PATCH 2/5] Fix pkgconfig file and library naming |
4222
|
42 |
|
43 See: https://codereview.qt-project.org/#/c/165394/ |
|
44 https://bugreports.qt.io/browse/QTBUG-30898 |
|
45 |
|
46 Currently, *.pc files are generated with debug suffix `d` in `-release` |
|
47 mode and without the suffix in `-debug` or `-debug-and-release`. This |
|
48 can be worked around by `CONIFG-=debug_and_release`, however, a more |
|
49 predictable and consistent naming approach would be preferable. |
|
50 |
|
51 This change mimics the *.prl file and lib conventions: |
|
52 |
|
53 -release: creates normal *.pc files and lib names |
|
54 -release -force-debug-info: normal as above |
|
55 -debug: creates *d.pc and *d lib names |
|
56 -debug-and-release: creates both |
|
57 -default: creates both (default link: debug) |
|
58 |
|
59 and should be unsurprising to users of `pkg-config`. At very least, |
|
60 it's deterministic and easily incorporated into build systems. |
|
61 |
|
62 Task-number: 30898 |
|
63 Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644 |
|
64 |
|
65 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf |
4900
|
66 index 51b5bde67a..faba17aedd 100644 |
4222
|
67 --- a/mkspecs/features/qt_module.prf |
|
68 +++ b/mkspecs/features/qt_module.prf |
4900
|
69 @@ -263,6 +263,10 @@ load(qt_installs) |
4222
|
70 |
|
71 load(qt_targets) |
|
72 |
|
73 +# Set TARGET towards the end but before pkgconfig setup to keep naming |
|
74 +# conventions consistent with *prl files |
|
75 +TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) |
|
76 + |
|
77 # this builds on top of qt_common |
4900
|
78 !internal_module:if(unix|mingw) { |
4222
|
79 CONFIG += create_pc |
4900
|
80 @@ -278,12 +282,12 @@ load(qt_targets) |
|
81 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] |
|
82 QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME |
|
83 } |
4222
|
84 - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") |
|
85 - QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) |
|
86 + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ") |
|
87 + QMAKE_PKGCONFIG_FILE = $$TARGET |
|
88 for(i, MODULE_DEPENDS): \ |
4735
|
89 - QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) |
|
90 + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() |
4222
|
91 isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ |
|
92 - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module |
|
93 + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module |
|
94 pclib_replace.match = $$lib_replace.match |
|
95 !isEmpty(lib_replace.replace): \ |
|
96 pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR |
4900
|
97 @@ -317,5 +321,3 @@ win32 { |
4222
|
98 # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API |
|
99 DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000 |
|
100 } |
|
101 - |
|
102 -TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end |
4310
|
103 -- |
4900
|
104 2.19.1 |
4735
|
105 |
|
106 |
4956
|
107 From 6a7989a069a7aa88e898c4f68bd753b480af0cdf Mon Sep 17 00:00:00 2001 |
4735
|
108 From: Mark Brand <mabrand@mabrand.nl> |
|
109 Date: Sun, 29 Jan 2017 13:02:16 +0100 |
4900
|
110 Subject: [PATCH 3/5] reenable fontconfig for win32 (MXE-specific) |
4735
|
111 |
|
112 Change-Id: I05b036366bd402e43309742412bcf8ca91fe125f |
|
113 |
|
114 diff --git a/src/gui/configure.json b/src/gui/configure.json |
4956
|
115 index 89934c8f1d..456643a22c 100644 |
4735
|
116 --- a/src/gui/configure.json |
|
117 +++ b/src/gui/configure.json |
4956
|
118 @@ -1209,7 +1209,7 @@ |
4735
|
119 "fontconfig": { |
|
120 "label": "Fontconfig", |
|
121 "autoDetect": "!config.darwin", |
|
122 - "condition": "!config.win32 && features.system-freetype && libs.fontconfig", |
|
123 + "condition": "features.system-freetype && libs.fontconfig", |
|
124 "output": [ "privateFeature", "feature" ] |
|
125 }, |
|
126 "gbm": { |
|
127 diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp |
|
128 index 0c04608fca..a26e02fbf3 100644 |
|
129 --- a/src/plugins/platforms/minimal/qminimalintegration.cpp |
|
130 +++ b/src/plugins/platforms/minimal/qminimalintegration.cpp |
|
131 @@ -161,7 +161,11 @@ QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const |
|
132 |
|
133 if (!m_fontDatabase) { |
|
134 #if QT_CONFIG(fontconfig) |
|
135 - m_fontDatabase = new QGenericUnixFontDatabase; |
|
136 +#ifdef Q_OS_WIN |
|
137 + m_fontDatabase = new QFreeTypeFontDatabase; |
|
138 +#else |
|
139 + m_fontDatabase = new QGenericUnixFontDatabase; |
|
140 +#endif |
|
141 #else |
|
142 m_fontDatabase = QPlatformIntegration::fontDatabase(); |
|
143 #endif |
|
144 -- |
4900
|
145 2.19.1 |
4735
|
146 |
|
147 |
4956
|
148 From dbe7086a860dc8aac17ed5d76bc45d605a19ac02 Mon Sep 17 00:00:00 2001 |
4735
|
149 From: Mark Brand <mabrand@mabrand.nl> |
|
150 Date: Sun, 11 Jun 2017 00:27:41 +0200 |
4900
|
151 Subject: [PATCH 4/5] use pkg-config for harfbuzz |
4735
|
152 |
|
153 Change-Id: Ia65cbb90fd180f1bc10ce077a9a8323a48e51421 |
|
154 |
|
155 diff --git a/src/gui/configure.json b/src/gui/configure.json |
4956
|
156 index 456643a22c..f36e15603b 100644 |
4735
|
157 --- a/src/gui/configure.json |
|
158 +++ b/src/gui/configure.json |
4956
|
159 @@ -301,7 +301,8 @@ |
4735
|
160 }, |
4956
|
161 "headers": "harfbuzz/hb.h", |
4735
|
162 "sources": [ |
|
163 - "-lharfbuzz" |
|
164 + { "type": "pkgConfig", "args": "harfbuzz" }, |
|
165 + "-lharfbuzz" |
|
166 ] |
|
167 }, |
|
168 "imf": { |
|
169 -- |
4900
|
170 2.19.1 |
4735
|
171 |
|
172 |
4956
|
173 From 2f96f49ffa2e4b42bb35da9304bba971cfcc1475 Mon Sep 17 00:00:00 2001 |
4735
|
174 From: Mark Brand <mabrand@mabrand.nl> |
|
175 Date: Thu, 23 Nov 2017 11:28:47 +0200 |
4900
|
176 Subject: [PATCH 5/5] disable qt_random_cpu for i686-w64-mingw32 |
4735
|
177 |
|
178 Workaround for gcc internal error compiling for mingw32: |
|
179 global/qrandom.cpp: In function 'qsizetype qt_random_cpu(void*, qsizetype)': |
|
180 global/qrandom.cpp:123:1: internal compiler error: in |
|
181 ix86_compute_frame_layout, at config/i386/i386.c:10145 |
|
182 } |
|
183 ^ |
|
184 |
|
185 global/qrandom.cpp:123:1: internal compiler error: Segmentation fault |
|
186 i686-w64-mingw32.static-g++: internal compiler error: Segmentation fault |
|
187 (program cc1plus) |
|
188 |
|
189 Based on https://codereview.qt-project.org/#/c/212360/ |
|
190 |
|
191 Change-Id: Ia1c902e7b147bdda2b8d7904b40a3b968b8d0369 |
|
192 |
|
193 diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp |
4956
|
194 index 6195c324e7..94902bcfc2 100644 |
4735
|
195 --- a/src/corelib/global/qrandom.cpp |
|
196 +++ b/src/corelib/global/qrandom.cpp |
|
197 @@ -90,7 +90,7 @@ DECLSPEC_IMPORT BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG Rando |
|
198 |
|
199 QT_BEGIN_NAMESPACE |
|
200 |
|
201 -#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) |
|
202 +#if defined(Q_PROCESSOR_X86) && !defined(Q_PROCESSOR_X86_32) && QT_COMPILER_SUPPORTS_HERE(RDRND) |
|
203 static qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW; |
|
204 |
|
205 # ifdef Q_PROCESSOR_X86_64 |
|
206 -- |
4900
|
207 2.19.1 |
4310
|
208 |
4735
|
209 diff -ur qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf |
4956
|
210 --- qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf 2018-06-12 07:47:54.488874295 -0400 |
|
211 +++ qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf 2018-06-12 07:48:46.550096817 -0400 |
4735
|
212 @@ -46,7 +46,7 @@ |
|
213 QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC |
|
214 QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC |
|
215 QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC |
|
216 -QMAKE_CFLAGS_ISYSTEM = -isystem |
|
217 +QMAKE_CFLAGS_ISYSTEM = -I |
|
218 QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses |
|
219 QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden |
|
220 QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions |