wok-current view qt4/stuff/gcc6_build_fix.patch @ rev 25698

Fix ntfs-3g receipt
author Stanislas Leduc <shann@slitaz.org>
date Tue Apr 16 19:01:01 2024 +0000 (5 months ago)
parents eb2c6b438b3f
children
line source
1 This patch is needed so that build does not fail on C++11 errors such as the one below:
3 In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h:84:0,
4 from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:24,
5 from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
6 ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: 'std::tr1' has not been declared
7 template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
8 ^
10 Signed-off-by: Lucas C. Villa Real <lucasvr@gobolinux.org>
12 --- qt-everywhere-opensource-src-4.8.6/src/script/script.pro.orig 2016-08-24 00:27:12.079214652 +0000
13 +++ qt-everywhere-opensource-src-4.8.6/src/script/script.pro 2016-08-24 00:24:42.151217592 +0000
14 @@ -107,3 +107,6 @@ integrity {
16 # WebKit doesn't compile in C++0x mode
17 *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
18 +
19 +# Fixes compilation errors with GCC 6.1.0
20 +QMAKE_CXXFLAGS += -std=gnu++98
21 --- qt-everywhere-opensource-src-4.8.7/src/plugins/accessible/widgets/widgets.pro.orig 2016-08-24 02:40:02.819058359 +0000
22 +++ qt-everywhere-opensource-src-4.8.7/src/plugins/accessible/widgets/widgets.pro 2016-08-24 02:40:31.543057795 +0000
23 @@ -21,4 +21,5 @@ HEADERS += qaccessiblewidgets.h \
24 qaccessiblemenu.h \
25 itemviews.h
27 -
28 +# Fixes compilation errors with GCC 6.1.0
29 +QMAKE_CXXFLAGS += -std=gnu++98
31 Avoid implicit conversions, which are now flagged by gcc6
33 | api/qcoloroutput_p.h:74:60: error: shift expression '(1048575 << 20)' overflows [-fpermissive]
34 | api/qcoloroutput_p.h:74:63: error: enumerator value for 'BackgroundMask' is not an integer constant
35 | BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
38 Upstream-Status: Inappropriate [Frozen upstream]
39 Signed-off-by: Khem Raj <raj.khem@gmail.com>
41 diff -up qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.than qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h
42 --- qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.than 2016-02-03 11:43:04.567757448 +0100
43 +++ qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h 2016-02-04 13:12:26.394350271 +0100
44 @@ -70,8 +70,8 @@ namespace QPatternist
45 ForegroundShift = 10,
46 BackgroundShift = 20,
47 SpecialShift = 20,
48 - ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
49 - BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
50 + ForegroundMask = 0x1f << ForegroundShift,
51 + BackgroundMask = 0x7 << BackgroundShift
52 };
54 public:
56 From e03ee6b5bca6ab457a16faa8399ba20cd5cc1fbc Mon Sep 17 00:00:00 2001
57 From: Jeroen Hofstee <jhofstee@victronenergy.com>
58 Date: Sat, 16 Nov 2019 16:50:00 +0100
59 Subject: [PATCH] silence some loud but innocent warnings
61 These warnings are harmless for old code, so suppress them so real
62 issue are visible in the logs.
63 ---
64 configure | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
65 1 file changed, 66 insertions(+)
67 diff --git a/configure b/configure
68 index a9ba7c8ccb..6ebf71ab21 100755
69 --- a/configure
70 +++ b/configure
71 @@ -3435,6 +3435,72 @@ if [ -n "$CFG_SYSROOT" ]; then
72 fi
73 export SYSROOT_FLAG # used by config.tests/unix/compile.test
75 +# Since qt4 is no longer officialy maintained, silence the harmless warnings
76 +# since nobody is going to fix them anyway...
77 +
78 +if compilerSupportsFlag $TEST_COMPILER -Wunused-but-set-variable -Werror; then
79 + QMakeVar add QMAKE_CFLAGS -Wno-unused-but-set-variable
80 + QMakeVar add QMAKE_CXXFLAGS -Wno-unused-but-set-variable
81 +fi
82 +
83 +if compilerSupportsFlag $TEST_COMPILER -Wunused-function -Werror; then
84 + QMakeVar add QMAKE_CFLAGS -Wno-unused-function
85 + QMakeVar add QMAKE_CXXFLAGS -Wno-unused-function
86 +fi
87 +
88 +if compilerSupportsFlag $TEST_COMPILER -Wunused-variable -Werror; then
89 + QMakeVar add QMAKE_CFLAGS -Wno-unused-variable
90 + QMakeVar add QMAKE_CXXFLAGS -Wno-unused-variable
91 +fi
92 +
93 +if compilerSupportsFlag $TEST_COMPILER -Wunused-local-typedefs; then
94 + QMakeVar add QMAKE_CFLAGS -Wno-unused-local-typedefs
95 + QMakeVar add QMAKE_CXXFLAGS -Wno-unused-local-typedefs
96 +fi
97 +
98 +if compilerSupportsFlag $TEST_COMPILER -Wimplicit-fallthrough -Werror; then
99 + QMakeVar add QMAKE_CFLAGS -Wno-implicit-fallthrough
100 + QMakeVar add QMAKE_CXXFLAGS -Wno-implicit-fallthrough
101 +fi
102 +
103 +if compilerSupportsFlag $TEST_COMPILER -Wunused-parameter -Werror; then
104 + QMakeVar add QMAKE_CFLAGS -Wno-unused-parameter
105 + QMakeVar add QMAKE_CXXFLAGS -Wno-unused-parameter
106 +fi
107 +
108 +# when a compiler starts guessing it is often wrong..
109 +if compilerSupportsFlag $TEST_COMPILER -Wmaybe-uninitialized -Werror; then
110 + QMakeVar add QMAKE_CFLAGS -Wno-maybe-uninitialized
111 + QMakeVar add QMAKE_CXXFLAGS -Wno-maybe-uninitialized
112 +fi
113 +
114 +if compilerSupportsFlag $TEST_COMPILER -Wswitch -Werror; then
115 + QMakeVar add QMAKE_CFLAGS -Wno-switch
116 + QMakeVar add QMAKE_CXXFLAGS -Wno-switch
117 +fi
118 +
119 +if compilerSupportsFlag $TEST_COMPILER -Wdeprecated-copy -Werror; then
120 + QMakeVar add QMAKE_CXXFLAGS -Wno-deprecated-copy
121 +fi
122 +
123 +if compilerSupportsFlag $TEST_COMPILER -Wdeprecated-declarations -Werror; then
124 + QMakeVar add QMAKE_CXXFLAGS -Wno-deprecated-declarations
125 +fi
126 +
127 +if compilerSupportsFlag $TEST_COMPILER -Wparentheses -Werror; then
128 + QMakeVar add QMAKE_CXXFLAGS -Wno-parentheses
129 +fi
130 +
131 +if compilerSupportsFlag $TEST_COMPILER -Wclass-memaccess -Werror; then
132 + QMakeVar add QMAKE_CXXFLAGS -Wno-class-memaccess
133 +fi
134 +
135 +# note: parameter passing for argument of type 'QMap<QSettingsKey, QVariant>::iterator' changed in GCC 7.1
136 +# Assuming that OE is used to rebuild all sources, there is no need to worry about abi changes..
137 +if compilerSupportsFlag $TEST_COMPILER -Wpsabi -Werror; then
138 + QMakeVar add QMAKE_CXXFLAGS -Wno-psabi
139 +fi
140 +
141 # auto-detect precompiled header support
142 if [ "$CFG_PRECOMPILE" = "auto" ]; then
143 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
144 --
145 2.17.1
147 Allow gcc v6 to build webkit. Without this, webkit isn't built
148 when gcc v6 is used (silently but then python-pyqt fails to build).
150 Upstream-Status: Inappropriate [no development on qt4 now]
151 RP 2016/5/26
153 Index: qt-everywhere-opensource-src-4.8.7/configure
154 ===================================================================
156 Amend this and change the logic to assume all compilers are suitable
157 exept 3.3x resp. 3.2x and older ones.
158 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
160 --- qt-everywhere-opensource-src-4.8.7.orig/configure
161 +++ qt-everywhere-opensource-src-4.8.7/configure
162 @@ -7757,15 +7757,15 @@
163 *-g++*)
164 # Check gcc's version
165 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
166 - 5*|4*|3.4*)
167 - ;;
168 3.3*)
169 canBuildWebKit="no"
170 ;;
171 - *)
172 + 3.2*|3.1*|3.0*|2*)
173 canBuildWebKit="no"
174 canBuildQtXmlPatterns="no"
175 ;;
176 + *)
177 + ;;
178 esac
179 ;;
180 solaris-cc*)