aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/ogl-runtime/0001-Qt3D-Add-support-to-fix-build-on-ppc64.patch
blob: 9f61a1e7a7982a0808f576b4b81a2f5a316eb089 (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
From c70df6bf52cdcdceb73ed965a28642177df32943 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 13 Mar 2021 12:58:32 -0800
Subject: [PATCH] Qt3D: Add support to fix build on ppc64

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/foundation/Qt3DSPreprocessor.h | 2 +-
 src/foundation/Qt3DSSystem.cpp     | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/src/foundation/Qt3DSPreprocessor.h
+++ b/src/foundation/Qt3DSPreprocessor.h
@@ -112,11 +112,11 @@ Platform define
 #define QT3DS_VMX
 #elif defined(__x86_64__)
 #define QT3DS_X64
-#elif defined(__ppc__)
-#define QT3DS_PPC
-#elif defined(__ppc64__)
+#elif defined(__powerpc64__)
 #define QT3DS_PPC
 #define QT3DS_PPC64
+#elif defined(__ppc__)
+#define QT3DS_PPC
 //#   elif defined(__aarch64__)
 //#       define QT3DS_ARM_64
 #else
--- a/src/foundation/Qt3DSSystem.cpp
+++ b/src/foundation/Qt3DSSystem.cpp
@@ -62,6 +62,10 @@ const char *qt3ds::foundation::System::g
 const char *qt3ds::foundation::System::g_Processor = "x64";
 const char *qt3ds::foundation::System::g_BitWidth = "64";
 const char *qt3ds::foundation::System::g_FloatingPointModel = "";
+#elif defined(QT3DS_PPC64)
+const char *qt3ds::foundation::System::g_Processor = "ppc64";
+const char *qt3ds::foundation::System::g_BitWidth = "64";
+const char *qt3ds::foundation::System::g_FloatingPointModel = "";
 #elif defined(QT3DS_ARM)
 #if defined(__aarch64__) || defined(__ARM64__)
 const char *qt3ds::foundation::System::g_Processor = "arm";
@@ -79,7 +83,7 @@ const char *qt3ds::foundation::System::g
 #endif
 #endif
 #else
-#error "Unknown Platform"
+//#error "Unknown Platform"
 #endif
 
 #if defined(QT3DS_ARM)
@@ -97,8 +101,10 @@ const char *qt3ds::foundation::System::g
 const char *qt3ds::foundation::System::g_GPUType = "";
 #elif defined(QT3DS_X64)
 const char *qt3ds::foundation::System::g_GPUType = "";
+#elif defined(QT3DS_PPC64)
+const char *qt3ds::foundation::System::g_GPUType = "";
 #else
-#error "Must define a processor type (QT3DS_ARM or QT3DS_X86)"
+//#error "Must define a processor type (QT3DS_ARM or QT3DS_X86)"
 #endif
 
 namespace {
@@ -136,4 +142,4 @@ const char *System::getPlatformGLStr()
         strcpy(text, str.c_str());
     }
     return text;
-}
\ No newline at end of file
+}