54 lines
2 KiB
Diff
54 lines
2 KiB
Diff
From 0b89a74fbf77ae6917f043c79cd03db0d6ef0212 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
|
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
|
Subject: [PATCH 31/35] druntime: link against libucontext on all platforms
|
|
|
|
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
|
|
index 925c53c5f5e..60c2a0c11c6 100755
|
|
--- a/libphobos/configure
|
|
+++ b/libphobos/configure
|
|
@@ -15216,14 +15216,6 @@ fi
|
|
# 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]))
|
|
--
|
|
2.41.0
|
|
|