-
Notifications
You must be signed in to change notification settings - Fork 5
/
qt6-base-6.4.2-e2k.patch
604 lines (568 loc) · 23.5 KB
/
qt6-base-6.4.2-e2k.patch
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
From 050ce8b7f0cd7215aac6a42a919f0c7a8df11118 Mon Sep 17 00:00:00 2001
From: Ilya Kurdyukov <jpegqs@gmail.com>
Date: Wed, 21 Feb 2024 09:36:01 +0700
Subject: [PATCH] qt6-base-6.4.2 e2k support
using LCC 1.27.12 and -mno-sse4.2
---
cmake/QtCompilerFlags.cmake | 2 ++
config.tests/x86_simd/main.cpp | 6 ++++++
configure.cmake | 1 +
mkspecs/features/toolchain.prf | 3 ++-
.../double-conversion/double-conversion/utils.h | 1 +
src/corelib/global/archdetect.cpp | 2 ++
src/corelib/global/qcompilerdetection.h | 12 +++++++++++-
src/corelib/global/qlogging.cpp | 2 +-
src/corelib/global/qnativeinterface.h | 7 +++++++
src/corelib/global/qprocessordetection.h | 9 +++++++++
src/corelib/global/qsimd.cpp | 6 +++++-
src/corelib/global/qsimd.h | 11 +++++++++++
src/corelib/global/qsimd_p.h | 12 ++++++------
src/corelib/global/qversiontagging.h | 3 +++
src/corelib/kernel/qmetatype.h | 3 +++
src/corelib/plugin/qelfparser_p.cpp | 2 ++
src/corelib/text/qanystringview.h | 2 +-
src/corelib/text/qstringview.h | 2 +-
src/corelib/thread/qfuture_impl.h | 4 ++++
src/corelib/tools/qhash.h | 9 +++++++++
src/corelib/tools/qlist.h | 4 ++++
src/gui/kernel/qplatformintegration.h | 9 +++++++++
src/gui/painting/qcolortrclut_p.h | 6 ++++++
src/gui/painting/qdrawhelper.cpp | 2 +-
src/gui/platform/unix/qunixnativeinterface.cpp | 15 +++++++++++++++
src/gui/platform/unix/qxkbcommon.cpp | 7 +++++++
.../xcb/gl_integrations/xcb_egl/qxcbeglcontext.h | 3 +++
tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 2 +-
tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 2 +-
29 files changed, 134 insertions(+), 15 deletions(-)
diff --git a/cmake/QtCompilerFlags.cmake b/cmake/QtCompilerFlags.cmake
index a34aaca2..1c9abd91 100644
--- a/cmake/QtCompilerFlags.cmake
+++ b/cmake/QtCompilerFlags.cmake
@@ -16,6 +16,8 @@ else()
else()
list(APPEND _qt_compiler_warning_flags_on -Wall -Wextra)
endif()
+ # False warnings of this type from EDG frontend are very annoying.
+ list(APPEND _qt_compiler_warning_flags_on -Wno-return-type)
list(APPEND _qt_compiler_warning_flags_off -w)
endif()
diff --git a/config.tests/x86_simd/main.cpp b/config.tests/x86_simd/main.cpp
index c7032317..5014a1a6 100644
--- a/config.tests/x86_simd/main.cpp
+++ b/config.tests/x86_simd/main.cpp
@@ -12,6 +12,12 @@
# define attribute_target(x)
#endif
+#if defined(__e2k__) && ( \
+ T(SSE4_2) || T(AVX) || T(AVX2) || \
+ T(F16C) || T(SHANI) || T(RDRND) || T(AESNI))
+#error
+#endif
+
#if T(SSE2)
attribute_target("sse2") void test_sse2()
{
diff --git a/configure.cmake b/configure.cmake
index 999c9133..67a441a3 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -722,6 +722,7 @@ qt_feature("sse2" PRIVATE
LABEL "SSE2"
CONDITION ( ( ( TEST_architecture_arch STREQUAL i386 )
OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND TEST_subarch_sse2 ) OR QT_FORCE_FEATURE_sse2 OR WASM
+ OR ( TEST_architecture_arch STREQUAL e2k )
AUTODETECT NOT WASM
)
qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 0040b6c4..7ce56869 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -263,7 +263,8 @@ isEmpty($${target_prefix}.INCDIRS) {
}
}
}
- if(!darwin:clang)|intel_icc {
+ arch = $$system("uname -m")
+ if(!darwin:clang)|intel_icc|equals(arch, e2k) {
# Clang on a non-Apple system (that is, a system without ld64 -- say, with GNU ld
# or gold under Linux) will not print any library search path. Need to use another
# invocation with different options (which in turn doesn't print include search
diff --git a/src/3rdparty/double-conversion/double-conversion/utils.h b/src/3rdparty/double-conversion/double-conversion/utils.h
index 41078b6c..805ab4ef 100644
--- a/src/3rdparty/double-conversion/double-conversion/utils.h
+++ b/src/3rdparty/double-conversion/double-conversion/utils.h
@@ -132,6 +132,7 @@ int main(int argc, char** argv) {
defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || \
+ defined(__e2k__) || \
defined(__loongarch__) || \
defined(__nios2__) || defined(__ghs) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index a0ce5baa..81c0a4dd 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -35,6 +35,8 @@
# define ARCH_PROCESSOR "riscv32"
#elif defined(Q_PROCESSOR_RISCV_64)
# define ARCH_PROCESSOR "riscv64"
+#elif defined(Q_PROCESSOR_E2K)
+# define ARCH_PROCESSOR "e2k"
#elif defined(Q_PROCESSOR_S390_X)
# define ARCH_PROCESSOR "s390x"
#elif defined(Q_PROCESSOR_S390)
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index f811f52c..312a19f0 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1100,6 +1100,16 @@
# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations")
# define QT_WARNING_DISABLE_FLOAT_COMPARE QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
# define QT_WARNING_DISABLE_INVALID_OFFSETOF QT_WARNING_DISABLE_CLANG("-Winvalid-offsetof")
+#elif defined(__EDG__)
+# define QT_WARNING_PUSH
+# define QT_WARNING_POP QT_DO_PRAGMA(diag_default deprecated_entity_with_custom_message)
+# define QT_WARNING_DISABLE_GCC(text)
+# define QT_WARNING_DISABLE_CLANG(text)
+# define QT_WARNING_DISABLE_INTEL(number)
+# define QT_WARNING_DISABLE_MSVC(number)
+# define QT_WARNING_DISABLE_DEPRECATED QT_DO_PRAGMA(diag_suppress deprecated_entity_with_custom_message)
+# define QT_WARNING_DISABLE_FLOAT_COMPARE
+# define QT_WARNING_DISABLE_INVALID_OFFSETOF
#elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
# define QT_WARNING_PUSH QT_DO_PRAGMA(GCC diagnostic push)
# define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop)
@@ -1179,7 +1189,7 @@
/*
Sanitize compiler feature availability
*/
-#if !defined(Q_PROCESSOR_X86)
+#if !defined(Q_PROCESSOR_X86) && !defined(__e2k__)
# undef QT_COMPILER_SUPPORTS_SSE2
# undef QT_COMPILER_SUPPORTS_SSE3
# undef QT_COMPILER_SUPPORTS_SSSE3
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 875067fc..f3708ba1 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1243,7 +1243,7 @@ void QMessagePattern::setPattern(const QString &pattern)
*/
static constexpr int TypicalBacktraceFrameCount = 8;
-# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(__EDG__)
// force skipping the frame pointer, to save the backtrace() function some work
# pragma GCC push_options
# pragma GCC optimize ("omit-frame-pointer")
diff --git a/src/corelib/global/qnativeinterface.h b/src/corelib/global/qnativeinterface.h
index 89f33651..374c64cc 100644
--- a/src/corelib/global/qnativeinterface.h
+++ b/src/corelib/global/qnativeinterface.h
@@ -121,7 +121,14 @@ namespace QNativeInterface::Private {
// Wrapper type to make the error message in case
// of incompatible interface types read better.
template <typename I>
+#ifdef __EDG__
+ struct NativeInterface : TypeInfo<I> {
+ template <typename BaseType>
+ static constexpr bool isCompatibleWith = TypeInfo<I>::template isCompatibleWith<BaseType>;
+ };
+#else
struct NativeInterface : TypeInfo<I> {};
+#endif
} // QNativeInterface::Private
// Declares an accessor for the native interface
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index f18cbf32..9df85b61 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -245,6 +245,15 @@
# endif
// Q_BYTE_ORDER not defined, use endianness auto-detection
+/*
+ Elbrus 2000 family.
+
+ Elbrus is little-endian.
+*/
+#elif defined(__e2k__)
+# define Q_PROCESSOR_E2K
+# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
+
/*
RISC-V family, known variants: 32- and 64-bit
diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp
index cc904335..6e6a2ea4 100644
--- a/src/corelib/global/qsimd.cpp
+++ b/src/corelib/global/qsimd.cpp
@@ -89,7 +89,7 @@ static const char features_string[] =
static const int features_indices[] = {
0, 1, 6
};
-#elif defined(Q_PROCESSOR_X86)
+#elif defined(Q_PROCESSOR_X86) || defined(__e2k__)
# include "qsimd_x86.cpp" // generated by util/x86simdgen
#else
static const char features_string[] = "";
@@ -546,7 +546,11 @@ static inline quint64 detectProcessorFeatures()
#else
static inline uint detectProcessorFeatures()
{
+#ifdef __e2k__
+ return qCompilerCpuFeatures;
+#else
return 0;
+#endif
}
#endif
diff --git a/src/corelib/global/qsimd.h b/src/corelib/global/qsimd.h
index 6ed7821e..86815dde 100644
--- a/src/corelib/global/qsimd.h
+++ b/src/corelib/global/qsimd.h
@@ -87,6 +87,10 @@
// Starting with /arch:AVX512, MSVC defines all the macros
#endif
+#ifdef __e2k__
+#define Q_PROCESSOR_X86
+#endif
+
#if defined(Q_PROCESSOR_X86) && defined(__SSE2__)
# include <immintrin.h>
# define QT_COMPILER_USES_sse2 1
@@ -112,6 +116,13 @@
# define QT_COMPILER_USES_sse4_1 -1
#endif
+#ifdef __e2k__
+#undef Q_PROCESSOR_X86
+#undef __SSE4_2__
+#undef __AVX__
+#undef __AVX2__
+#endif
+
#if defined(Q_PROCESSOR_X86) && defined(__SSE4_2__)
# define QT_COMPILER_USES_sse4_2 1
#else
diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
index 37734198..06999955 100644
--- a/src/corelib/global/qsimd_p.h
+++ b/src/corelib/global/qsimd_p.h
@@ -160,7 +160,7 @@ QT_WARNING_DISABLE_INTEL(103)
# define QT_FUNCTION_TARGET(x)
#endif
-#ifdef Q_PROCESSOR_X86
+#if defined(Q_PROCESSOR_X86) || defined(__e2k__)
/* -- x86 intrinsic support -- */
# if defined(Q_CC_MSVC) && (defined(_M_X64) || _M_IX86_FP >= 2)
@@ -213,7 +213,7 @@ asm(
// macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
// ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
# define ARCH_HASWELL_MACROS (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
-# if ARCH_HASWELL_MACROS != 0
+# if ARCH_HASWELL_MACROS != 0 && !defined(__e2k__)
# if ARCH_HASWELL_MACROS != 4
# error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
# endif
@@ -291,7 +291,7 @@ inline uint8_t vaddv_u8(uint8x8_t v8)
#endif
#endif
-#ifndef Q_PROCESSOR_X86
+#if !defined(Q_PROCESSOR_X86) && !defined(__e2k__)
enum CPUFeatures {
#if defined(Q_PROCESSOR_ARM)
CpuFeatureNEON = 2,
@@ -336,7 +336,7 @@ extern "C" {
# define Q_ATOMIC(T) _Atomic(T)
#endif
-#ifdef Q_PROCESSOR_X86
+#if defined(Q_PROCESSOR_X86) || defined(__e2k__)
typedef uint64_t QCpuFeatureType;
static const QCpuFeatureType qCompilerCpuFeatures = _compilerCpuFeatures;
static const QCpuFeatureType CpuFeatureArchHaswell = cpu_haswell;
@@ -349,7 +349,7 @@ Q_CORE_EXPORT uint64_t QT_MANGLE_NAMESPACE(qDetectCpuFeatures)();
static inline uint64_t qCpuFeatures()
{
-#ifdef QT_BOOTSTRAPPED
+#if defined(QT_BOOTSTRAPPED) || defined(__e2k__)
return qCompilerCpuFeatures; // no detection
#else
quint64 features = atomic_load_explicit(QT_MANGLE_NAMESPACE(qt_cpu_features), memory_order_relaxed);
@@ -388,7 +388,7 @@ static inline uint64_t qCpuFeatures()
*/
static inline void qYieldCpu()
{
-#if defined(Q_PROCESSOR_X86)
+#if defined(Q_PROCESSOR_X86) || defined(__e2k__)
_mm_pause();
#elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 /* yield was added in ARMv7 */
# if __has_builtin(__builtin_arm_yield) /* e.g. Clang */
diff --git a/src/corelib/global/qversiontagging.h b/src/corelib/global/qversiontagging.h
index e64cae1d..30aaaa66 100644
--- a/src/corelib/global/qversiontagging.h
+++ b/src/corelib/global/qversiontagging.h
@@ -101,6 +101,9 @@ struct QVersionTag
# ifdef Q_OS_DARWIN
# define QT_VERSION_TAG_SECTION __attribute__((section("__DATA,.qtversion")))
# endif
+# ifdef __EDG__
+# define QT_VERSION_TAG_SECTION
+# endif
# define QT_VERSION_TAG_ATTRIBUTE __attribute__((visibility("hidden"), used))
# define QT_VERSION_TAG2(sym, imp) \
extern "C" Q_DECL_IMPORT const char sym; \
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index f015daeb..fc064384 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -793,6 +793,9 @@ namespace QtPrivate
{
template<typename U>
static auto check(U *) -> std::integral_constant<bool, sizeof(U) != 0>;
+#ifdef __EDG__
+ static auto check(void *) -> std::false_type;
+#endif
static auto check(...) -> std::false_type;
using type = decltype(check(static_cast<T *>(nullptr)));
};
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 6ebfaff2..f388cf2b 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -138,6 +138,8 @@ struct ElfMachineCheck
EM_SPARCV9
#elif defined(Q_PROCESSOR_SPARC)
EM_SPARC
+#elif defined(__e2k__)
+ EM_MCST_ELBRUS
#elif defined(Q_PROCESSOR_WASM)
#elif defined(Q_PROCESSOR_X86_32)
EM_386
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
index 2601ce74..2697197a 100644
--- a/src/corelib/text/qanystringview.h
+++ b/src/corelib/text/qanystringview.h
@@ -59,7 +59,7 @@ private:
# if defined(__cpp_lib_is_constant_evaluated)
if (!std::is_constant_evaluated())
return false;
-# elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+# elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(__EDG__)
if (!str || !__builtin_constant_p(*str))
return false;
# endif
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index d820ec8a..eab029f4 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -104,7 +104,7 @@ private:
#if defined(__cpp_lib_is_constant_evaluated)
if (std::is_constant_evaluated())
return std::char_traits<Char>::length(str);
-#elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+#elif defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(__EDG__)
if (__builtin_constant_p(*str))
return std::char_traits<Char>::length(str);
#endif
diff --git a/src/corelib/thread/qfuture_impl.h b/src/corelib/thread/qfuture_impl.h
index 8e96b943..6c7c5ed3 100644
--- a/src/corelib/thread/qfuture_impl.h
+++ b/src/corelib/thread/qfuture_impl.h
@@ -891,7 +891,11 @@ namespace QtFuture {
template<class Signal>
using ArgsType = typename QtPrivate::ArgResolver<Signal>::AllArgs;
+#ifdef __EDG__
+template<class Sender, class Signal>
+#else
template<class Sender, class Signal, typename = QtPrivate::EnableIfInvocable<Sender, Signal>>
+#endif
static QFuture<ArgsType<Signal>> connect(Sender *sender, Signal signal)
{
using ArgsType = ArgsType<Signal>;
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 952911f9..92563104 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -29,6 +29,11 @@ namespace QHashPrivate {
template <typename T, typename = void>
constexpr inline bool HasQHashOverload = false;
+#ifdef __EDG__
+template <typename T1, typename T2>
+constexpr inline bool HasQHashOverload<std::pair<T1, T2>> = true;
+#endif
+
template <typename T>
constexpr inline bool HasQHashOverload<T, std::enable_if_t<
std::is_convertible_v<decltype(qHash(std::declval<const T &>(), std::declval<size_t>())), size_t>
@@ -827,7 +832,11 @@ public:
using reference = T &;
using const_reference = const T &;
+#ifdef __EDG__
+ inline QHash() noexcept {}
+#else
inline QHash() noexcept = default;
+#endif
inline QHash(std::initializer_list<std::pair<Key,T> > list)
: d(new Data(list.size()))
{
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 0cc62e5f..c9e176e0 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -259,7 +259,11 @@ public:
}
public:
+#ifdef __EDG__
+ QList() {}
+#else
QList() = default;
+#endif
explicit QList(qsizetype size)
: d(Data::allocate(size))
{
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index 46f1d743..eee1a5c0 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -47,6 +47,13 @@ class QVulkanInstance;
namespace QNativeInterface::Private {
+#ifdef __EDG__
+#define QInterfaceProxy_EDG(X, T, func) \
+ if (auto *iface = dynamic_cast<T*>(X)) \
+ return iface->func; \
+ return nullptr
+#endif
+
template <typename R, typename I, auto func, typename... Args>
struct QInterfaceProxyImp
{
@@ -64,8 +71,10 @@ template <auto func>
struct QInterfaceProxy;
template <typename R, typename I, typename... Args, R(I::*func)(Args...)>
struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {};
+#ifndef __EDG__
template <typename R, typename I, typename... Args, R(I::*func)(Args...) const>
struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {};
+#endif
} // QNativeInterface::Private
diff --git a/src/gui/painting/qcolortrclut_p.h b/src/gui/painting/qcolortrclut_p.h
index 1b312d4a..9b80c673 100644
--- a/src/gui/painting/qcolortrclut_p.h
+++ b/src/gui/painting/qcolortrclut_p.h
@@ -191,7 +191,13 @@ public:
ushort m_fromLinear[(255 * 16) + 1]; // [0-4080] -> [0-65280]
private:
+#ifdef __EDG__
+public:
+#endif
QColorTrcLut() { } // force uninitialized members
+#ifdef __EDG__
+private:
+#endif
static std::shared_ptr<QColorTrcLut> create();
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 35c44b82..4a151b52 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6239,7 +6239,7 @@ void qt_memfill64(quint64 *dest, quint64 color, qsizetype count)
}
#endif
-#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(__e2k__)
__attribute__((optimize("no-tree-vectorize")))
#endif
void qt_memfill24(quint24 *dest, quint24 color, qsizetype count)
diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp
index 4ea88a59..3fe35cb6 100644
--- a/src/gui/platform/unix/qunixnativeinterface.cpp
+++ b/src/gui/platform/unix/qunixnativeinterface.cpp
@@ -66,14 +66,24 @@ QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QGLXIntegration);
QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext)
{
+#ifdef __EDG__
+ QInterfaceProxy_EDG(QGuiApplicationPrivate::platformIntegration(),
+ QGLXIntegration, createOpenGLContext(configBasedContext, nullptr, shareContext));
+#else
return QGuiApplicationPrivate::platformIntegration()->call<
&QGLXIntegration::createOpenGLContext>(configBasedContext, nullptr, shareContext);
+#endif
}
QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext)
{
+#ifdef __EDG__
+ QInterfaceProxy_EDG(QGuiApplicationPrivate::platformIntegration(),
+ QGLXIntegration, createOpenGLContext(visualBasedContext, visualInfo, shareContext));
+#else
return QGuiApplicationPrivate::platformIntegration()->call<
&QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext);
+#endif
}
#endif // QT_CONFIG(xcb_glx_plugin)
@@ -126,8 +136,13 @@ QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEGLIntegration);
QOpenGLContext *QNativeInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext)
{
+#ifdef __EDG__
+ QInterfaceProxy_EDG(QGuiApplicationPrivate::platformIntegration(),
+ QEGLIntegration, createOpenGLContext(context, display, shareContext));
+#else
return QGuiApplicationPrivate::platformIntegration()->call<
&QEGLIntegration::createOpenGLContext>(context, display, shareContext);
+#endif
}
#endif // QT_CONFIG(egl)
diff --git a/src/gui/platform/unix/qxkbcommon.cpp b/src/gui/platform/unix/qxkbcommon.cpp
index fd368f82..1618b337 100644
--- a/src/gui/platform/unix/qxkbcommon.cpp
+++ b/src/gui/platform/unix/qxkbcommon.cpp
@@ -239,6 +239,13 @@ static constexpr const auto KeyTbl = qMakeArray(
Xkb2Qt<XKB_KEY_dead_small_schwa, Qt::Key_Dead_Small_Schwa>,
Xkb2Qt<XKB_KEY_dead_capital_schwa, Qt::Key_Dead_Capital_Schwa>,
Xkb2Qt<XKB_KEY_dead_greek, Qt::Key_Dead_Greek>,
+// removed in libxkbcommon-1.6.0
+#ifndef XKB_KEY_dead_lowline
+#define XKB_KEY_dead_lowline 0xfe90
+#define XKB_KEY_dead_aboveverticalline 0xfe91
+#define XKB_KEY_dead_belowverticalline 0xfe92
+#define XKB_KEY_dead_longsolidusoverlay 0xfe93
+#endif
Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>,
Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>,
Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>,
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
index 30444932..1fa160a7 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
@@ -14,6 +14,9 @@ class QXcbEglContext : public QEGLPlatformContext
{
public:
using QEGLPlatformContext::QEGLPlatformContext;
+#ifdef __EDG__
+ QXcbEglContext() {}
+#endif
QXcbEglContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share, EGLDisplay display)
: QEGLPlatformContext(glFormat, share, display, nullptr)
{
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index f464b427..89628451 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -24,7 +24,7 @@
#include <float.h>
#include <math.h>
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) && !defined(__e2k__)
# include <fenv.h>
# define QT_USE_FENV
#endif
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index eb705a02..55632b5a 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -2832,7 +2832,7 @@ void tst_QPainter::monoImages()
#if defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD) || defined(Q_OS_ANDROID)
# define TEST_FPE_EXCEPTIONS
-#elif defined(Q_OS_LINUX) && defined(__GLIBC__)
+#elif defined(Q_OS_LINUX) && defined(__GLIBC__) && !defined(__e2k__)
# define TEST_FPE_EXCEPTIONS
#elif defined(Q_OS_WIN) && defined(Q_CC_GNU)
# define TEST_FPE_EXCEPTIONS
--
2.34.1