summarylogtreecommitdiffstats
path: root/qtbug-53375.patch
blob: 4af3146244524b616f1e944325bc39a04200fc16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
From e5498f154425c1e07bbea32624a7495099b3ab9b Mon Sep 17 00:00:00 2001
From: Felix Schindler <aur@felixschindler.net>
Date: Fri, 28 Jul 2017 18:27:03 +0200
Subject: [PATCH] Remove -isystem from qmake due to QTBUG-53375

This is just https://codereview.qt-project.org/#/c/159215 applied
to the 5.8.0 sources, due to
https://bugreports.qt.io/browse/QTBUG-53375.
---
 qtbase/mkspecs/common/clang.conf             |  1 -
 qtbase/mkspecs/common/gcc-base.conf          |  1 -
 qtbase/mkspecs/linux-icc/qmake.conf          |  1 -
 qtbase/qmake/generators/unix/unixmake2.cpp   | 14 +++-----------
 qtbase/qmake/generators/win32/mingw_make.cpp |  8 +-------
 5 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/qtbase/mkspecs/common/clang.conf b/qtbase/mkspecs/common/clang.conf
index e003b94..11ee10f 100644
--- a/qtbase/mkspecs/common/clang.conf
+++ b/qtbase/mkspecs/common/clang.conf
@@ -16,7 +16,6 @@ QMAKE_LINK_SHLIB        = $$QMAKE_CXX
 CONFIG                 += clang_pch_style
 QMAKE_PCH_OUTPUT_EXT    = .pch
 
-QMAKE_CFLAGS_ISYSTEM             = -isystem
 QMAKE_CFLAGS_PRECOMPILE          = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
 QMAKE_CFLAGS_USE_PRECOMPILE      = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
 QMAKE_CFLAGS_LTCG                = -flto
diff --git a/qtbase/mkspecs/common/gcc-base.conf b/qtbase/mkspecs/common/gcc-base.conf
index 6e043f5..df8d314 100644
--- a/qtbase/mkspecs/common/gcc-base.conf
+++ b/qtbase/mkspecs/common/gcc-base.conf
@@ -44,7 +44,6 @@ QMAKE_CFLAGS_DEBUG         += -g
 QMAKE_CFLAGS_SHLIB         += -fPIC
 QMAKE_CFLAGS_STATIC_LIB    += -fPIC
 QMAKE_CFLAGS_APP           += -fPIC
-QMAKE_CFLAGS_ISYSTEM        = -isystem
 QMAKE_CFLAGS_YACC          += -Wno-unused -Wno-parentheses
 QMAKE_CFLAGS_HIDESYMS      += -fvisibility=hidden
 QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
diff --git a/qtbase/mkspecs/linux-icc/qmake.conf b/qtbase/mkspecs/linux-icc/qmake.conf
index 2c66e80..a4fd592 100644
--- a/qtbase/mkspecs/linux-icc/qmake.conf
+++ b/qtbase/mkspecs/linux-icc/qmake.conf
@@ -21,7 +21,6 @@ QMAKE_CFLAGS_DEBUG      = -O0 -g
 QMAKE_CFLAGS_SHLIB      = -fPIC
 QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
 QMAKE_CFLAGS_YACC       =
-QMAKE_CFLAGS_ISYSTEM    = -isystem
 QMAKE_CFLAGS_THREAD     = -D_REENTRANT
 QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
 QMAKE_CFLAGS_LTCG       = -ipo -fno-fat-lto-objects
diff --git a/qtbase/qmake/generators/unix/unixmake2.cpp b/qtbase/qmake/generators/unix/unixmake2.cpp
index 6fa3553..a826cdc 100644
--- a/qtbase/qmake/generators/unix/unixmake2.cpp
+++ b/qtbase/qmake/generators/unix/unixmake2.cpp
@@ -176,16 +176,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
     t << "CXXFLAGS      = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n";
     t << "INCPATH       =";
     {
-        QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
         const ProStringList &incs = project->values("INCLUDEPATH");
         for(int i = 0; i < incs.size(); ++i) {
             const ProString &inc = incs.at(i);
-            if (inc.isEmpty())
-                continue;
-
-            if (!isystem.isEmpty() && isSystemInclude(inc.toQString()))
-                t << ' ' << isystem << ' ';
-            else
+            if (!inc.isEmpty())
                 t << " -I";
             t << escapeFilePath(inc);
         }
@@ -1358,10 +1352,8 @@ void UnixMakefileGenerator::init2()
     }
 
     if (include_deps && project->isActiveConfig("gcc_MD_depends")) {
-        // use -MMD if we know about -isystem too
-        ProString MD_flag(project->values("QMAKE_CFLAGS_ISYSTEM").isEmpty() ? "-MD" : "-MMD");
-        project->values("QMAKE_CFLAGS") += MD_flag;
-        project->values("QMAKE_CXXFLAGS") += MD_flag;
+        project->values("QMAKE_CFLAGS") += "-MD";
+        project->values("QMAKE_CXXFLAGS") += "-MD";
     }
 }
 
diff --git a/qtbase/qmake/generators/win32/mingw_make.cpp b/qtbase/qmake/generators/win32/mingw_make.cpp
index 8d5a9a7..9e67500 100644
--- a/qtbase/qmake/generators/win32/mingw_make.cpp
+++ b/qtbase/qmake/generators/win32/mingw_make.cpp
@@ -249,17 +249,11 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
 {
     t << "INCPATH       = ";
 
-    QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
     const ProStringList &incs = project->values("INCLUDEPATH");
     for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
         QString inc = (*incit).toQString();
         inc.replace(QRegExp("\\\\$"), "");
-
-        if (!isystem.isEmpty() && isSystemInclude(inc))
-            t << isystem << ' ';
-        else
-            t << "-I";
-        t << escapeFilePath(inc) << ' ';
+        t << "-I" << escapeFilePath(inc) << ' ';
     }
     t << endl;
 }
-- 
2.13.3