[Bug 241849] lang/ghc: Enable USE_PTHREAD_FOR_ITIMER

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 25 18:31:44 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241849

Kevin Zheng <kevinz5000 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #209025|0                           |1
        is obsolete|                            |

--- Comment #7 from Kevin Zheng <kevinz5000 at gmail.com> ---
Created attachment 214847
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=214847&action=edit
Patch

Hi again,

This issue is still present in the ghc-8.8.3 in ports. Some quick investigation
reveals that USE_PTHREAD_FOR_ITIMER is only set if THREADED_RTS is defined;
that is, when ghc is run with the `-threaded` option:

https://gitlab.haskell.org/ghc/ghc/-/commit/ec8a463d1ff948ba9b1b0fbb538f7d5a237bf44a

>From the context, Linux is the only OS where USE_PTHREAD_FOR_ITIMER depends on
THREADED_RTS also being set. This seems to be because on Linux, GHC uses some
timerfd thing.

FreeBSD, like the rest of the OS's, should always define
USE_PTHREAD_FOR_ITIMER. The patch to correct this locally is attached. I will
defer to haskell@, but would prefer this to be applied locally with a
PORTREVISION bump because of the long time it takes to update a version from
upstream.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-haskell mailing list