Hi,

I also ended up NMUing libunwind. Here is my diff:

>From 5dff90a8af00aeeb8db2215d3bf05453b81719a2 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <[email protected]>
Date: Mon, 16 Mar 2026 07:07:21 +0100
Subject: [PATCH] NMU libunwind/1.8.1-0.3 disabling C++ exception support

Disable C++ exception support for all architectures.

 * hppa maintainer John Dave Anglin reported it (and other things) as
   broken via #1107618 and requested it to be disabled.
 * python-memray autopkgtests segfault (#1122076) when libunwind is
   lazy-loaded, because its semantics do not match gcc's, whose symbols
   it overrides.
 * There is another x86 segfault reported upstream (#1130107) where
   disabling C++ exception support makes the problem go away.
 * It was originally enabled in Debian to support clang/llvm (#923962),
   but that ends up using its own libunwind.
 * Fedora disables C++ exception support.
 * libunwind upstream recommends disabling it.
   https://github.com/libunwind/libunwind/issues/405#issuecomment-1209587993
 * I ran autopkgtests for all rdeps with C++ exception support disabled
   and none of the failures is to be attributed to this change.
---
 debian/changelog | 8 ++++++++
 debian/rules     | 6 +-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8b88ab6..18198a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libunwind (1.8.1-0.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Disable C++ exception support everywhere.
+    (Closes: #1122076, #1130107) (Addresses: #1107618)
+
+ -- Helmut Grohne <[email protected]>  Mon, 16 Mar 2026 07:03:10 +0100
+
 libunwind (1.8.1-0.2) unstable; urgency=medium
 
   * Non-maintainer upload
diff --git a/debian/rules b/debian/rules
index 76f11d9..a76f9ca 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,10 +6,6 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=-all,+format
 
-ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386))
-  CXX_EXCEPTIONS=--enable-cxx-exceptions
-endif
-
 %:
        dh $@
 
@@ -24,7 +20,7 @@ debian/libunwind-setjmp0.%: debian/libunwind-setjmp0.%.in
        sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
 
 override_dh_auto_configure:
-       dh_auto_configure -- $(CXX_EXCEPTIONS) --disable-zlibdebuginfo 
--includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH)
+       dh_auto_configure -- --disable-cxx-exceptions --disable-zlibdebuginfo 
--includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH)
 
 override_dh_install:
        dh_install
-- 
2.50.1

Helmut

Reply via email to