On 13/04/2020 15:36, Iain Buclaw via Gcc-patches wrote: > On 08/04/2020 10:14, Iain Buclaw via Gcc-patches wrote: >> On 28/01/2020 05:00, Mathias Lang wrote: >>> diff -Nurp a/libphobos/configure.ac b/libphobos/configure.ac >>> --- a/libphobos/configure.ac >>> +++ b/libphobos/configure.ac >>> @@ -140,6 +140,14 @@ case ${host} in >>> esac >>> AC_MSG_RESULT($LIBPHOBOS_SUPPORTED) >>> >>> +AC_MSG_CHECKING([if target needs to link in swapcontext]) >>> +AC_MSG_RESULT($LIBDRUNTIME_NEEDS_UCONTEXT) >>> +AS_IF([test "x$LIBDRUNTIME_NEEDS_UCONTEXT" = xyes], [ >>> + AC_SEARCH_LIBS([swapcontext], [c ucontext], [], [ >>> + AC_MSG_ERROR([[can't find library providing swapcontext]]) >>> + ]) >>> +]) >>> + >> >> Rather than adding LIBDRUNTIME_NEEDS_UCONTEXT, couldn't you just add a >> one-liner AC_SEARCH_LIBS to the WITH_LOCAL_DRUNTIME list? >> >> Testing as I suggest locally, there is no problems on x86 and x86_64. >> >> Iain. >> > > Hi Matthias, > > Does the following change work well for you on s390x-musl? > >
Spoke off channel, and we're fine with the proposed patch. Tested on x86_64-linux-gnu and s390x-linux-musl, committed to mainline.