aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-08 15:18:53 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2021-03-10 13:09:35 +0100
commita1981938c245473f08f0531fc4c821cb67d26296 (patch)
tree65cd714cc3a98bddc9eefda31fee23548641c921
parent9e17c61bee3ac58c1d02c472db1d92bd9de27bee (diff)
qt3d: Fix build on riscv/gcc11
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/qt5/qt3d/0001-renderers-opengl-Link-in-libatomic-on-riscv.patch28
-rw-r--r--recipes-qt/qt5/qt3d_git.bb2
2 files changed, 30 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qt3d/0001-renderers-opengl-Link-in-libatomic-on-riscv.patch b/recipes-qt/qt5/qt3d/0001-renderers-opengl-Link-in-libatomic-on-riscv.patch
new file mode 100644
index 00000000..9f6e1f54
--- /dev/null
+++ b/recipes-qt/qt5/qt3d/0001-renderers-opengl-Link-in-libatomic-on-riscv.patch
@@ -0,0 +1,28 @@
+From b2c6dd0330d9dee417192a32ae6c636b77b6bf46 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 8 Mar 2021 15:16:01 -0800
+Subject: [PATCH] renderers/opengl: Link in libatomic on riscv
+
+GCC 11 needs this since it failing to find a builtin function
+
+Fixes
+src/plugins/renderers/opengl/renderer/renderview.cpp:107: undefined reference to `__atomic_exchange_1'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/plugins/renderers/opengl/opengl.pri | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/plugins/renderers/opengl/opengl.pri b/src/plugins/renderers/opengl/opengl.pri
+index 1682ab7b3..31b71dd6b 100644
+--- a/src/plugins/renderers/opengl/opengl.pri
++++ b/src/plugins/renderers/opengl/opengl.pri
+@@ -39,3 +39,5 @@ qtConfig(qt3d-simd-sse2):!qtConfig(qt3d-simd-avx2) {
+ CONFIG += simd
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
+ }
++
++LIBS += "-latomic"
+--
+2.30.1
+
diff --git a/recipes-qt/qt5/qt3d_git.bb b/recipes-qt/qt5/qt3d_git.bb
index 294cffb4..53f4e484 100644
--- a/recipes-qt/qt5/qt3d_git.bb
+++ b/recipes-qt/qt5/qt3d_git.bb
@@ -16,6 +16,8 @@ DEPENDS_class-target += "qtdeclarative qt3d-native"
SRC_URI += " \
file://0001-Allow-a-tools-only-build.patch \
"
+SRC_URI_append_riscv64 = " file://0001-renderers-opengl-Link-in-libatomic-on-riscv.patch"
+SRC_URI_append_riscv32 = " file://0001-renderers-opengl-Link-in-libatomic-on-riscv.patch"
PACKAGECONFIG ??= ""
PACKAGECONFIG_class-native ??= "tools-only"