diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-03-08 15:18:53 -0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2021-03-10 13:09:35 +0100 |
| commit | a1981938c245473f08f0531fc4c821cb67d26296 (patch) | |
| tree | 65cd714cc3a98bddc9eefda31fee23548641c921 | |
| parent | 9e17c61bee3ac58c1d02c472db1d92bd9de27bee (diff) | |
| download | meta-qt5-a1981938c245473f08f0531fc4c821cb67d26296.tar.gz | |
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.patch | 28 | ||||
| -rw-r--r-- | recipes-qt/qt5/qt3d_git.bb | 2 |
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 @@ | |||
| 1 | From b2c6dd0330d9dee417192a32ae6c636b77b6bf46 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 8 Mar 2021 15:16:01 -0800 | ||
| 4 | Subject: [PATCH] renderers/opengl: Link in libatomic on riscv | ||
| 5 | |||
| 6 | GCC 11 needs this since it failing to find a builtin function | ||
| 7 | |||
| 8 | Fixes | ||
| 9 | src/plugins/renderers/opengl/renderer/renderview.cpp:107: undefined reference to `__atomic_exchange_1' | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | src/plugins/renderers/opengl/opengl.pri | 2 ++ | ||
| 14 | 1 file changed, 2 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/src/plugins/renderers/opengl/opengl.pri b/src/plugins/renderers/opengl/opengl.pri | ||
| 17 | index 1682ab7b3..31b71dd6b 100644 | ||
| 18 | --- a/src/plugins/renderers/opengl/opengl.pri | ||
| 19 | +++ b/src/plugins/renderers/opengl/opengl.pri | ||
| 20 | @@ -39,3 +39,5 @@ qtConfig(qt3d-simd-sse2):!qtConfig(qt3d-simd-avx2) { | ||
| 21 | CONFIG += simd | ||
| 22 | QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2 | ||
| 23 | } | ||
| 24 | + | ||
| 25 | +LIBS += "-latomic" | ||
| 26 | -- | ||
| 27 | 2.30.1 | ||
| 28 | |||
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" | |||
| 16 | SRC_URI += " \ | 16 | SRC_URI += " \ |
| 17 | file://0001-Allow-a-tools-only-build.patch \ | 17 | file://0001-Allow-a-tools-only-build.patch \ |
| 18 | " | 18 | " |
| 19 | SRC_URI_append_riscv64 = " file://0001-renderers-opengl-Link-in-libatomic-on-riscv.patch" | ||
| 20 | SRC_URI_append_riscv32 = " file://0001-renderers-opengl-Link-in-libatomic-on-riscv.patch" | ||
| 19 | 21 | ||
| 20 | PACKAGECONFIG ??= "" | 22 | PACKAGECONFIG ??= "" |
| 21 | PACKAGECONFIG_class-native ??= "tools-only" | 23 | PACKAGECONFIG_class-native ??= "tools-only" |
