libsdl2: Fix build when libunwind is not used
PATCH 1/1 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.
--- .../libsdl2/optional-libunwind-generic.patch | 18 ++++++++++++++++++ .../recipes-graphics/libsdl2/libsdl2_2.0.18.bb | 1 + 2 files changed, 19 insertions(+) create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch
meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch new file +18 -0
@@ -0,0 +1,18 @@ +Do not error when libunwind-generic is not found, Not all +implementations of libunwind will provide this library therefore +do not make it hard error if its not found. + +Upstream-Status: Inappropriate [Only needed when using llvm unwinder] +Signed-off-by: Khem Raj <[email protected]> + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1358,7 +1358,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROI + if(HAVE_LIBUNWIND_H) + # We've already found the header, so REQUIRE the lib to be present + pkg_search_module(UNWIND REQUIRED libunwind) +- pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic) ++ pkg_search_module(UNWIND_GENERIC libunwind-generic) + list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES}) + endif() + endif()
meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb +1 -0
@@ -18,6 +18,7 @@ PROVIDES = "virtual/libsdl2" SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ file://0001-Fix-build-against-wayland-1.20.patch \ + file://optional-libunwind-generic.patch \ " S = "${WORKDIR}/SDL2-${PV}"
Signature · 1 line
2.34.1
Quoted 10 lines · Khem Raj
clang provides
libunwind.hand 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.Signed-off-by Khem Raj <[email protected]>Cc Andreas Müller <[email protected]>
Had just started to look into before I saw this. Thanks for taking care.
Cheers
Andreas
Wait, why is this inappropriate? It seems quite suitable for sending upstream.
Alex
Quoted 28 lines · Andreas Müller
Quoted 10 lines · Khem Raj
clang provides
libunwind.hand 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.Signed-off-by Khem Raj <[email protected]>Cc Andreas Müller <[email protected]>Had just started to look into before I saw this. Thanks for taking care.
Cheers
Andreas
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#160242):
https://lists.openembedded.org/g/openembedded-core/message/160242
Mute This Topic: https://lists.openembedded.org/mt/88245006/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-