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