summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/libsdl2
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-01-07 11:22:55 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-08 14:17:35 +0000
commit0b032e6ff476ce94fb283d4af9914e373a8e317b (patch)
tree21288400ca93ae4a86686adc768f4644bfca3b35 /meta/recipes-graphics/libsdl2
parentc48097ece963ffb0387597fda6dd043951a8d598 (diff)
downloadpoky-0b032e6ff476ce94fb283d4af9914e373a8e317b.tar.gz
libsdl2: Fix build when libunwind is not used
clang provides libunwind.h and cmake adds a check to find libunwind when this header is detected, which was not the case with automake. The check however is expecting specific unwinder implementation which provides libunwind-generic solib, this is not a standard library that all implementations will provide, therefore make this check optional. (From OE-Core rev: fb450807774d100b9b568364b014ac46f5642b7e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/libsdl2')
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch18
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb1
2 files changed, 19 insertions, 0 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch b/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch
new file mode 100644
index 0000000000..757b99a5f6
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch
@@ -0,0 +1,18 @@
1Do not error when libunwind-generic is not found, Not all
2implementations of libunwind will provide this library therefore
3do not make it hard error if its not found.
4
5Upstream-Status: Submitted [https://github.com/libsdl-org/SDL/pull/5194]
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8--- a/CMakeLists.txt
9+++ b/CMakeLists.txt
10@@ -1358,7 +1358,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROI
11 if(HAVE_LIBUNWIND_H)
12 # We've already found the header, so REQUIRE the lib to be present
13 pkg_search_module(UNWIND REQUIRED libunwind)
14- pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic)
15+ pkg_search_module(UNWIND_GENERIC libunwind-generic)
16 list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
17 endif()
18 endif()
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb
index 893386343a..1559d5e942 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb
@@ -18,6 +18,7 @@ PROVIDES = "virtual/libsdl2"
18 18
19SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ 19SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
20 file://0001-Fix-build-against-wayland-1.20.patch \ 20 file://0001-Fix-build-against-wayland-1.20.patch \
21 file://optional-libunwind-generic.patch \
21" 22"
22 23
23S = "${WORKDIR}/SDL2-${PV}" 24S = "${WORKDIR}/SDL2-${PV}"