On musl, linking against libphobos fails because it requires ucontext but is not explicitly linked against it. This is caused by configure assuming that it is implemented in assembly, but it is actually not implemented. This silently works on other libcs because context API does not require an external library. --- libphobos/m4/druntime/libraries.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libphobos/m4/druntime/libraries.m4 b/libphobos/m4/druntime/libraries.m4 index 45a56f6f76a..e11582e433a 100644 --- a/libphobos/m4/druntime/libraries.m4 +++ b/libphobos/m4/druntime/libraries.m4 @@ -223,10 +223,14 @@ AC_DEFUN([DRUNTIME_LIBRARIES_UCONTEXT], case "$target_cpu" in aarch64* | \ arm* | \ - i[[34567]]86|x86_64 | \ powerpc) druntime_fiber_asm_external=yes ;; + i[[34567]]86|x86_64) + if test "$enable_cet" = no; then + druntime_fiber_asm_external=yes + fi + ;; esac if test "$druntime_fiber_asm_external" = no; then AC_SEARCH_LIBS([swapcontext], [c ucontext], [], -- 2.34.1