musllvm

A pure LLVM/Clang cross compiler toolchain targeting musl C
git clone git://git.daat.foo/musllvm.git
Log | Files | Refs | README | LICENSE

0004-llvm-disable-dependency-on-libexecinfo-everywhere.patch (3168B)


      1 From 4db989c74c1b837f218c253034bce2bbad7e5a54 Mon Sep 17 00:00:00 2001
      2 From: q66 <q66@chimera-linux.org>
      3 Date: Fri, 29 Nov 2024 19:33:12 +0100
      4 Subject: [PATCH 04/29] llvm: disable dependency on libexecinfo everywhere
      5 
      6 ---
      7  compiler-rt/cmake/config-ix.cmake       | 1 -
      8  llvm/cmake/config-ix.cmake              | 2 --
      9  llvm/include/llvm/Config/config.h.cmake | 5 -----
     10  llvm/lib/Support/CMakeLists.txt         | 8 --------
     11  4 files changed, 16 deletions(-)
     12 
     13 diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
     14 index cf729c3ad..2a8a424c0 100644
     15 --- a/compiler-rt/cmake/config-ix.cmake
     16 +++ b/compiler-rt/cmake/config-ix.cmake
     17 @@ -191,7 +191,6 @@ check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
     18  check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
     19  check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
     20  check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
     21 -check_library_exists(execinfo backtrace "" COMPILER_RT_HAS_LIBEXECINFO)
     22  
     23  if (ANDROID AND COMPILER_RT_HAS_LIBDL)
     24    # Android's libstdc++ has a dependency on libdl.
     25 diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
     26 index 767774812..dbacb6127 100644
     27 --- a/llvm/cmake/config-ix.cmake
     28 +++ b/llvm/cmake/config-ix.cmake
     29 @@ -297,8 +297,6 @@ endif()
     30  # function checks
     31  check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM)
     32  find_package(Backtrace)
     33 -set(HAVE_BACKTRACE ${Backtrace_FOUND})
     34 -set(BACKTRACE_HEADER ${Backtrace_HEADER})
     35  
     36  # Prevent check_symbol_exists from using API that is not supported for a given
     37  # deployment target.
     38 diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake
     39 index f6f10ea4f..578751766 100644
     40 --- a/llvm/include/llvm/Config/config.h.cmake
     41 +++ b/llvm/include/llvm/Config/config.h.cmake
     42 @@ -27,11 +27,6 @@
     43     backslashes. */
     44  #cmakedefine01 LLVM_WINDOWS_PREFER_FORWARD_SLASH
     45  
     46 -/* Define to 1 if you have the `backtrace' function. */
     47 -#cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
     48 -
     49 -#define BACKTRACE_HEADER <${BACKTRACE_HEADER}>
     50 -
     51  /* Define to 1 if you have the <CrashReporterClient.h> header file. */
     52  #cmakedefine HAVE_CRASHREPORTERCLIENT_H
     53  
     54 diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
     55 index a6d8a2581..2178edb7d 100644
     56 --- a/llvm/lib/Support/CMakeLists.txt
     57 +++ b/llvm/lib/Support/CMakeLists.txt
     58 @@ -49,14 +49,6 @@ elseif( CMAKE_HOST_UNIX )
     59    if( HAVE_LIBDL )
     60      set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
     61    endif()
     62 -  if( HAVE_BACKTRACE AND NOT "${Backtrace_LIBRARIES}" STREQUAL "" )
     63 -    # On BSDs, CMake returns a fully qualified path to the backtrace library.
     64 -    # We need to remove the path and the 'lib' prefix, to make it look like a
     65 -    # regular short library name, suitable for appending to a -l link flag.
     66 -    get_filename_component(Backtrace_LIBFILE ${Backtrace_LIBRARIES} NAME_WE)
     67 -    STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
     68 -    set(system_libs ${system_libs} ${Backtrace_LIBFILE})
     69 -  endif()
     70    set(system_libs ${system_libs} ${LLVM_ATOMIC_LIB})
     71    set(system_libs ${system_libs} ${LLVM_PTHREAD_LIB})
     72    if( UNIX AND NOT (BEOS OR HAIKU) )
     73 -- 
     74 2.49.0
     75