Skip to content

Commit

Permalink
help correctly link to dl/pthreads on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Jun 22, 2024
1 parent 4095fd7 commit 78b11e7
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 6 deletions.
2 changes: 2 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ source:
- patches/0005-disable-_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPT.patch
# GCC's C linker does not understand -nostdlib++; needs CXX
- patches/0006-set-CXX-as-language-for-libunwind-to-avoid-running-i.patch
# something broke detection of dladdr on linux
- patches/0007-avoid-misdetection-of-dl-pthread-on-linux.patch

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion recipe/patches/0001-Support-legacy-standalone-builds.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bf0dac8954fed53dcc579ccf564dd011e11616b2 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Tue, 18 May 2021 19:51:28 -0500
Subject: [PATCH 1/6] Support legacy standalone builds
Subject: [PATCH 1/7] Support legacy standalone builds

---
libcxx/src/CMakeLists.txt | 17 +++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b1113a136e91b0788e2fa28e578142e45016eae9 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Tue, 13 Jul 2021 01:57:06 -0500
Subject: [PATCH 2/6] Fix ABI compatibility with system
Subject: [PATCH 2/7] Fix ABI compatibility with system

---
libcxx/src/locale.cpp | 16 ++++++++--------
Expand Down
2 changes: 1 addition & 1 deletion recipe/patches/0003-custom-error-message-for-old-sdk.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7e2722ee435b20f9445be40ace0f5298126ae23c Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Wed, 29 Dec 2021 19:28:35 -0800
Subject: [PATCH 3/6] custom error message for old sdk
Subject: [PATCH 3/7] custom error message for old sdk

Co-Authored-By: H. Vetinari <h.vetinari@gmx.com>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1e69aea47bc666836672f1da1c4f8d6a515e8689 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Wed, 8 Feb 2023 16:44:15 +1100
Subject: [PATCH 4/6] Revert "[libc++] Remove workaround for C11 features on
Subject: [PATCH 4/7] Revert "[libc++] Remove workaround for C11 features on
compilers that don't support using_if_exists"

This reverts commit 21f73d5826fb5024a27eaacafadfa316f58949c5.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 5499430ec91578805ae0ca5fd5c994f29e41b01d Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 26 May 2024 22:04:04 +1100
Subject: [PATCH 5/6] disable _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
Subject: [PATCH 5/7] disable _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
unconditionally

https://github.com/llvm/llvm-project/issues/77653
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7d1809e27c49dadf14b791cdc93a1ea58a2d8def Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 26 May 2024 13:01:28 +1100
Subject: [PATCH 6/6] set CXX as language for libunwind to avoid running into
Subject: [PATCH 6/7] set CXX as language for libunwind to avoid running into
unknown flags for CC

---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 8ca66527c9f7930a153ee8be487aa77734277967 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 26 May 2024 15:35:03 +1100
Subject: [PATCH 7/7] avoid misdetection of dl/pthread on linux

---
libunwind/cmake/config-ix.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake
index 126c872f0d48..7b5ff47ac011 100644
--- a/libunwind/cmake/config-ix.cmake
+++ b/libunwind/cmake/config-ix.cmake
@@ -120,8 +120,8 @@ if(FUCHSIA)
set(LIBUNWIND_HAS_DL_LIB NO)
set(LIBUNWIND_HAS_PTHREAD_LIB NO)
else()
- check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
- check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
+ set(LIBUNWIND_HAS_DL_LIB YES)
+ set(LIBUNWIND_HAS_PTHREAD_LIB YES)
endif()

if(HAIKU)

0 comments on commit 78b11e7

Please sign in to comment.