Skip to content

Commit 4a17e3e

Browse files
committed
Merge pull request #946 from luke-jr/bugfix_rm_mingw
Move QMAKE_LIBS_QT_ENTRY adjustment to bitcoin side of build
2 parents 958fe01 + 49e1501 commit 4a17e3e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

bitcoin-qt.pro

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,21 @@ isEmpty(BOOST_INCLUDE_PATH) {
293293
macx:BOOST_INCLUDE_PATH = /opt/local/include
294294
}
295295

296-
windows:LIBS += -lmingwthrd -lws2_32 -lshlwapi
297-
windows:DEFINES += _MT WIN32
296+
windows:LIBS += -lws2_32 -lshlwapi
297+
windows:DEFINES += WIN32
298298
windows:RC_FILE = src/qt/res/bitcoin-qt.rc
299299

300+
windows:!contains(MINGW_THREAD_BUGFIX, 0) {
301+
# At least qmake's win32-g++-cross profile is missing the -lmingwthrd
302+
# thread-safety flag. GCC has -mthreads to enable this, but it doesn't
303+
# work with static linking. -lmingwthrd must come BEFORE -lmingw, so
304+
# it is prepended to QMAKE_LIBS_QT_ENTRY.
305+
# It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
306+
# any problems on some untested qmake profile now or in the future.
307+
DEFINES += _MT
308+
QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
309+
}
310+
300311
!windows:!mac {
301312
DEFINES += LINUX
302313
LIBS += -lrt

contrib/gitian-descriptors/qt-win32.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ script: |
4747
cp -a bin $SRCDIR/
4848
cd $INSTDIR
4949
find . -name *.prl | xargs -l sed 's|/$||' -i
50-
sed 's/QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain/QMAKE_LIBS_QT_ENTRY = -lqtmain/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
5150
#sed 's|QMAKE_PRL_LIBS.*|QMAKE_PRL_LIBS = -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtNetwork -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32|' -i imports/Qt/labs/particles/qmlparticlesplugin.prl
5251
5352
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date

0 commit comments

Comments
 (0)