From 913b396a0959605852b845a830818d4bcbb37ae4 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Thu, 27 Oct 2016 03:01:25 +0300 Subject: qt, qtbase: -no-pch (pre-compiled header support) Qt and qtbase fail to build if host compiler is GCC 6 with the following error message: cc1: error: one or more PCH files were found, but they were invalid cc1: error: use -Winvalid-pch for more information cc1: fatal error: .obj/release-shared/qt_pch.h: No such file or directory See https://github.com/mxe/mxe/issues/1554 See https://github.com/mxe/mxe/issues/1103 See https://github.com/mxe/mxe/pull/1527#issuecomment-254001204 --- src/qt.mk | 1 + src/qtbase.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qt.mk b/src/qt.mk index 7bf9be7..d250eb1 100644 --- a/src/qt.mk +++ b/src/qt.mk @@ -65,6 +65,7 @@ define $(PKG)_BUILD -system-sqlite \ -openssl-linked \ -dbus-linked \ + -no-pch \ -v \ $($(PKG)_CONFIGURE_OPTS) diff --git a/src/qtbase.mk b/src/qtbase.mk index 8217442..8cc2d2f 100644 --- a/src/qtbase.mk +++ b/src/qtbase.mk @@ -57,6 +57,7 @@ define $(PKG)_BUILD -system-pcre \ -openssl-linked \ -dbus-linked \ + -no-pch \ -v \ $($(PKG)_CONFIGURE_OPTS) -- cgit v0.12 From e0d23ae9ab7221b097fd79fbfe1201c46acd52cf Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Fri, 28 Oct 2016 01:57:11 +0300 Subject: qt 4: backport patch for -no-pch from qtbase 5.7.0 See https://github.com/mxe/mxe/pull/1527#issuecomment-256717489 See https://github.com/mxe/mxe/issues/1554#issuecomment-256764411 --- src/qt-1-cherrypicks.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/src/qt-1-cherrypicks.patch b/src/qt-1-cherrypicks.patch index a800148..19039e7 100644 --- a/src/qt-1-cherrypicks.patch +++ b/src/qt-1-cherrypicks.patch @@ -80668,3 +80668,70 @@ index dee735b..14cf433 100755 -- 2.1.4 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: James McDonnell +Date: Thu, 14 Apr 2016 16:48:15 -0400 +Subject: [PATCH] Ensure -no-pch is effective + +Have configure add a "CONFIG -= precompile_header" to qmodule.pri when + -no-pch is specified. Ensures that Qt is built without precompiled +headers (as requested) even if allowing precompiled header use is the +default for the toolchain. + +Parallels changes to Windows configure. + +Task-number: QTBUG-11545 +Change-Id: Iab4021e74c4e9978770e917dff97b976c449dd8b +Reviewed-by: Oswald Buddenhagen + +The patch was backported from Qt 5.7.0 +Commit in qtbase git: 7c1326a1c390bb15eaa164f748c947f1df9f542d + +diff --git a/configure b/configure +index 1111111..2222222 100755 +--- a/configure ++++ b/configure +@@ -64,6 +64,7 @@ fi + OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"` + + # initialize global variables ++CONFIG_SEPARATORS=`printf ' \t'` + QMAKE_SWITCHES= + QMAKE_VARS= + QMAKE_CONFIG= +@@ -201,6 +202,21 @@ getXQMakeConf() + getQMakeConf3 "$1" "$xspecvals" + } + ++testXConfig() ++{ ++ # Put a space on each end of the CONFIG value so that searching for the ++ # target with whitespace on either side will work even when it's the ++ # first/last/only item in the CONFIG value. ++ case \ `getXQMakeConf CONFIG`\ in ++ *[${CONFIG_SEPARATORS}]$1[${CONFIG_SEPARATORS}]*) ++ return 0 ++ ;; ++ *) ++ return 1 ++ ;; ++ esac ++} ++ + compilerSupportsFlag() + { + cat >conftest.cpp <