Skip to content

Commit

Permalink
qt: backport fix_mingw_cross_compile.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
xanimo committed Mar 24, 2024
1 parent 624a5d3 commit f6e5db0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $(package)_patches+=fix_qfontengine_coretext.patch
$(package)_patches+=fix_qt_pkgconfig.patch
$(package)_patches+=no-xlib.patch
$(package)_patches+=backports-1.patch
$(package)_patches+= fix_mingw_cross_compile.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
Expand Down Expand Up @@ -184,6 +185,7 @@ define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
patch -p1 < $($(package)_patch_dir)/backports-1.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_mingw_cross_compile.patch && \
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
Expand Down
25 changes: 25 additions & 0 deletions depends/patches/qt/fix_mingw_cross_compile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
commit 5a992a549adfe5a587bbcd6cd2b2cee47d236e27
Author: fanquake <[email protected]>
Date: Fri Sep 4 08:13:44 2020 +0800

Work around broken mingw cross-compilation

See upstream issues:
https://bugreports.qt.io/browse/QTBUG-63637
https://bugreports.qt.io/browse/QTBUG-63659
https://codereview.qt-project.org/q/8bebded9

We should be able to drop this once we are building qt 5.10.1 or later.

Added in #12971.

diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf
index e071a0d1..ad229b10 100644
--- a/qtbase/mkspecs/win32-g++/qmake.conf
+++ b/qtbase/mkspecs/win32-g++/qmake.conf
@@ -87,3 +87,5 @@ QMAKE_NM = $${CROSS_COMPILE}nm -P
include(../common/angle.conf)

load(qt_config)
+QMAKE_LINK_OBJECT_MAX = 10
+QMAKE_LINK_OBJECT_SCRIPT = object_script

0 comments on commit f6e5db0

Please sign in to comment.