* [PATCH] libsdl2: Fix build when libunwind is not used
@ 2022-01-06 18:54 Khem Raj
2022-01-06 19:19 ` Andreas Müller
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2022-01-06 18:54 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj, Andreas Müller
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.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
.../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
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 00000000000..df9a65ab6bc
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/optional-libunwind-generic.patch
@@ -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 <raj.khem@gmail.com>
+
+--- 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()
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.18.bb
index 20e49428359..8417443226c 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"
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}"
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] libsdl2: Fix build when libunwind is not used
2022-01-06 18:54 [PATCH] libsdl2: Fix build when libunwind is not used Khem Raj
@ 2022-01-06 19:19 ` Andreas Müller
2022-01-06 19:21 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Müller @ 2022-01-06 19:19 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Thu, Jan 6, 2022 at 7:54 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Andreas Müller <schnitzeltony@gmail.com>
Had just started to look into before I saw this. Thanks for taking care.
Cheers
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] libsdl2: Fix build when libunwind is not used
2022-01-06 19:19 ` Andreas Müller
@ 2022-01-06 19:21 ` Alexander Kanavin
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2022-01-06 19:21 UTC (permalink / raw)
To: Andreas Müller; +Cc: Khem Raj, OE-core
[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]
Wait, why is this inappropriate? It seems quite suitable for sending
upstream.
Alex
On Thu, 6 Jan 2022 at 20:19, Andreas Müller <schnitzeltony@gmail.com> wrote:
> On Thu, Jan 6, 2022 at 7:54 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Andreas Müller <schnitzeltony@gmail.com>
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 2329 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-06 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 18:54 [PATCH] libsdl2: Fix build when libunwind is not used Khem Raj
2022-01-06 19:19 ` Andreas Müller
2022-01-06 19:21 ` [OE-core] " Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox