diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 0c52157739..8d2acb64b6 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -284,6 +284,8 @@ in { # See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12586 ++ onWindows (fromUntil "9.6.6" "9.12" ./patches/ghc/ghc-win32-io-manager-compilation.patch) + + ++ from "9.8.4" ./patches/ghc/ghc-9.8-threaded-rts-timer.patch ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/ghc-9.8-threaded-rts-timer.patch b/overlays/patches/ghc/ghc-9.8-threaded-rts-timer.patch new file mode 100644 index 0000000000..ac2a386724 --- /dev/null +++ b/overlays/patches/ghc/ghc-9.8-threaded-rts-timer.patch @@ -0,0 +1,26 @@ +diff --git a/rts/posix/Ticker.c b/rts/posix/Ticker.c +index 18bf1179dd..9ecfb1ff97 100644 +--- a/rts/posix/Ticker.c ++++ b/rts/posix/Ticker.c +@@ -62,7 +62,7 @@ + #endif + + /* +- * On Linux we can use timerfd_* (introduced in Linux ++ * On Linux in the threaded RTS we can use timerfd_* (introduced in Linux + * 2.6.25) and a thread instead of alarm signals. It avoids the risk of + * interrupting syscalls (see #10840) and the risk of being accidentally + * modified in user code using signals. NetBSD has also added timerfd +@@ -71,11 +71,11 @@ + * For older version of linux/netbsd without timerfd we fall back to the + * pthread based implementation. + */ +-#if defined(HAVE_SYS_TIMERFD_H) ++#if defined(HAVE_SYS_TIMERFD_H) && defined(THREADED_RTS) + #define USE_TIMERFD_FOR_ITIMER + #endif + +-#if defined(linux_HOST_OS) ++#if defined(linux_HOST_OS) && defined(THREADED_RTS) + #define USE_PTHREAD_FOR_ITIMER + #endif