2023-05-15 08:15:31 +00:00
|
|
|
From 1c7088d3182fac082706bfa9ec3864291b91b2b7 Mon Sep 17 00:00:00 2001
|
2022-08-13 15:17:36 +00:00
|
|
|
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
2023-05-15 08:15:31 +00:00
|
|
|
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
|
|
|
Subject: [PATCH 31/33] druntime: link against libucontext on all platforms
|
2022-08-13 15:17:36 +00:00
|
|
|
|
|
|
|
On musl-based Linux distributions, swapcontext etc. are not provided by
|
|
|
|
musl but instead by libucontext. Hence, we _always_ need to link against
|
|
|
|
an external library for these functions.
|
|
|
|
---
|
|
|
|
libphobos/configure | 8 --------
|
|
|
|
libphobos/m4/druntime/libraries.m4 | 8 --------
|
|
|
|
2 files changed, 16 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/libphobos/configure b/libphobos/configure
|
2023-05-15 08:15:31 +00:00
|
|
|
index 925c53c5f5e..60c2a0c11c6 100755
|
2022-08-13 15:17:36 +00:00
|
|
|
--- a/libphobos/configure
|
|
|
|
+++ b/libphobos/configure
|
2023-05-15 08:15:31 +00:00
|
|
|
@@ -15216,14 +15216,6 @@ fi
|
2022-08-13 15:17:36 +00:00
|
|
|
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
|
|
|
# "yes" for targets that have 'version = AsmExternal'.
|
|
|
|
druntime_fiber_asm_external=no
|
|
|
|
- case "$target_cpu" in
|
|
|
|
- aarch64* | \
|
|
|
|
- arm* | \
|
|
|
|
- i[34567]86|x86_64 | \
|
|
|
|
- powerpc)
|
|
|
|
- druntime_fiber_asm_external=yes
|
|
|
|
- ;;
|
|
|
|
- esac
|
|
|
|
if test "$druntime_fiber_asm_external" = no; then
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing swapcontext" >&5
|
|
|
|
$as_echo_n "checking for library containing swapcontext... " >&6; }
|
|
|
|
diff --git a/libphobos/m4/druntime/libraries.m4 b/libphobos/m4/druntime/libraries.m4
|
|
|
|
index 45a56f6f76a..fef6e890b1e 100644
|
|
|
|
--- a/libphobos/m4/druntime/libraries.m4
|
|
|
|
+++ b/libphobos/m4/druntime/libraries.m4
|
|
|
|
@@ -220,14 +220,6 @@ AC_DEFUN([DRUNTIME_LIBRARIES_UCONTEXT],
|
|
|
|
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
|
|
|
# "yes" for targets that have 'version = AsmExternal'.
|
|
|
|
druntime_fiber_asm_external=no
|
|
|
|
- case "$target_cpu" in
|
|
|
|
- aarch64* | \
|
|
|
|
- arm* | \
|
|
|
|
- i[[34567]]86|x86_64 | \
|
|
|
|
- powerpc)
|
|
|
|
- druntime_fiber_asm_external=yes
|
|
|
|
- ;;
|
|
|
|
- esac
|
|
|
|
if test "$druntime_fiber_asm_external" = no; then
|
|
|
|
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
|
|
|
|
AC_MSG_ERROR([swapcontext required but not found]))
|
2023-05-15 08:15:31 +00:00
|
|
|
--
|
|
|
|
2.40.1
|
|
|
|
|