lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e955affd 1/2: Replace nongnu with llvm unwind


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e955affd 1/2: Replace nongnu with llvm unwind library
Date: Wed, 5 Oct 2022 19:49:22 -0400 (EDT)

branch: master
commit e955affd5392b8156ebbf1bfb91a80e4b1c2309b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Replace nongnu with llvm unwind library
    
    * compiler_gcc_warnings.make: Prevent unit tests from failing. See:
      https://lists.nongnu.org/archive/html/lmi/2022-10/msg00006.html
    
    * lmi_setup_20.sh: Install debian packages 'libc++-dev' (which replaces
    'libunwind') and 'libc++abi-dev' (which is required for building
    unwindable code).
    
    * unwind.cpp: Remove UNW_LOCAL_ONLY macro, which would otherwise be
    flagged as unused. The old HP library was intended to support remote
    as well as local unwinding--see:
      https://lists.llvm.org/pipermail/cfe-dev/2016-September/050649.html
    but the llvm library doesn't use that macro because it doesn't implement
    remote unwinding.
    
    * workhorse.make: Add the llvm library's include directory to the
    '-isystem' include path (to suppress compiler warnings for its
    contents). Do this unconditionally, for simplicity, even though msw
    builds don't use it. It would seem preferable to include the principal
    header as <libunwind/libunwind.h>, but that doesn't work--see:
      https://lists.nongnu.org/archive/html/lmi/2022-09/msg00011.html
---
 compiler_gcc_warnings.make | 1 +
 lmi_setup_20.sh            | 3 ++-
 unwind.cpp                 | 2 --
 workhorse.make             | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler_gcc_warnings.make b/compiler_gcc_warnings.make
index 857f29c6..6a82fc5a 100644
--- a/compiler_gcc_warnings.make
+++ b/compiler_gcc_warnings.make
@@ -266,6 +266,7 @@ $(wno_sign_conv_objects): gcc_common_extra_warnings += 
-Wno-sign-conversion
 # For lmi, this seems to affect only UBSAN builds.
 
 wno_maybe_uninitialized_objects := \
+  $(unit_test_targets) \
   my_prod.o \
   pdf_command_wx.o \
   wx_test_about_version.o \
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index 35e908c0..62b75605 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -103,13 +103,14 @@ apt-get --assume-yes install \
   gnupg \
   jing \
   libarchive-tools \
+  libc++-dev \
+  libc++abi-dev \
   libc6-dbg \
   libdw-dev \
   libgtk-3-dev \
   libpcre2-dev \
   libtool \
   libxml2-utils \
-  libunwind-dev \
   libxslt1-dev \
   lld \
   make \
diff --git a/unwind.cpp b/unwind.cpp
index 20e85bf5..986d6846 100644
--- a/unwind.cpp
+++ b/unwind.cpp
@@ -27,8 +27,6 @@ bool g_unwind = true;
 
 #if defined LMI_X86_64 && defined LMI_POSIX && defined __GLIBCXX__
 
-#define UNW_LOCAL_ONLY
-
 #include <cstdio>                       // fprintf()
 #include <cstdlib>                      // free()
 #include <cxxabi.h>
diff --git a/workhorse.make b/workhorse.make
index cd300c31..0a0046e2 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -343,6 +343,7 @@ sys_include_directories := \
   $(compiler_include_directory) \
   $(wx_include_paths) \
   /opt/lmi/third_party/include \
+  /usr/include/libunwind \
   $(localincludedir) \
   $(localincludedir)/libxml2 \
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]