From 9cc350b4550d07555c43afafe37b7eae45f1b248 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 25 Jul 2024 21:52:59 -0700 Subject: sysprof: Fix build with llvm libunwind Update status of the patches Signed-off-by: Khem Raj --- ...Check-for-unw_set_caching_policy-before-u.patch | 27 ++++++++++++++++++++++ ...-for-libunwind-instead-of-libunwind-gener.patch | 2 +- meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb | 4 +++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch new file mode 100644 index 0000000000..2dca95dac5 --- /dev/null +++ b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch @@ -0,0 +1,27 @@ +From a3316e607db2a64e030df8551455c5700b5ddfcf Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2024 20:18:17 -0700 +Subject: [PATCH] libsysprof: Check for unw_set_caching_policy before using + +llvm libunwind does not implement unw_cache_* functions yet + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] +Signed-off-by: Khem Raj +--- + src/libsysprof/preload/backtrace-helper.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libsysprof/preload/backtrace-helper.h b/src/libsysprof/preload/backtrace-helper.h +index 88dc194..5c23ad3 100644 +--- a/src/libsysprof/preload/backtrace-helper.h ++++ b/src/libsysprof/preload/backtrace-helper.h +@@ -32,7 +32,9 @@ static void + backtrace_init (void) + { + #ifdef ENABLE_LIBUNWIND ++# ifdef UNW_CACHE_PER_THREAD + unw_set_caching_policy (unw_local_addr_space, UNW_CACHE_PER_THREAD); ++# endif + # ifdef HAVE_UNW_SET_CACHE_SIZE + unw_set_cache_size (unw_local_addr_space, 1024, 0); + #endif diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch index 1082fe4ffc..ea9bdb2eb5 100644 --- a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch +++ b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch @@ -6,7 +6,7 @@ Subject: [PATCH] meson: Check for libunwind instead of libunwind-generic This helps it to use llvm unwinder since libunwind-generic is specific to nongnu libunwind. -Upstream-Status: Pending +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] Signed-off-by: Khem Raj --- meson.build | 2 +- diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb b/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb index bf4ee7a73e..fccca1d8ff 100644 --- a/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb +++ b/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb @@ -15,7 +15,9 @@ DEPENDS += " \ " SRC_URI += "file://0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch \ - file://0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch " + file://0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch \ + file://0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch \ + " SRC_URI[archive.sha256sum] = "07d9081a66cf2fb52753f48ff2b85ada75c60ff1bc1af1bd14d8aeb627972168" PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'sysprofd', '', d)} \ -- cgit v1.2.3-54-g00ecf