Commit 6bee8644 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

rts: Fix build when linked with gold

As reported in #12812, the runtime system fails to build when linked
with gold due to a missing dependency on libpthread.

Additionally, rts/package.conf.in uses the WORD_SIZE_IN_BITS macro
defined by MachDeps.h, which it does not #include. Fix this.

Test Plan: Validate with gold linker

Reviewers: hsyl20, austin, erikd, simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2695

GHC Trac Issues: #12816

(cherry picked from commit 2cfbee89)
parent 4b8202eb
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "ghcconfig.h" #include "ghcconfig.h"
#include "rts/Config.h" #include "rts/Config.h"
#include "MachDeps.h"
name: rts name: rts
version: 1.0 version: 1.0
...@@ -42,17 +43,7 @@ extra-libraries: ...@@ -42,17 +43,7 @@ extra-libraries:
,"gdi32" /* for the linker */ ,"gdi32" /* for the linker */
,"winmm" /* for the linker */ ,"winmm" /* for the linker */
#endif #endif
#ifdef freebsd_HOST_OS , "pthread" /* for pthread_getthreadid_np, pthread_create, etc. */
, "pthread" /* for pthread_getthreadid_np() */
#endif
#ifdef openbsd_HOST_OS
/* OpenBSD's libffi is not directly linked to the libpthread but still requires
pthread functionality. This means that any client binary which links with libffi
also need to link with libpthread. If it does not, then linking fails with
unresolved symbols. */
, "pthread"
#endif
#if defined(DEBUG) && defined(HAVE_LIBBFD) #if defined(DEBUG) && defined(HAVE_LIBBFD)
,"bfd", "iberty" /* for debugging */ ,"bfd", "iberty" /* for debugging */
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment