[commit: ghc] ghc-8.0: rts: Fix build when linked with gold (6bee864)
git at git.haskell.org
git at git.haskell.org
Mon Nov 14 22:20:10 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/6bee8644d959ec77745d835c8c4453f2147bd8d7/ghc
>---------------------------------------------------------------
commit 6bee8644d959ec77745d835c8c4453f2147bd8d7
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Nov 11 22:04:32 2016 -0500
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 2cfbee896be349d16238c044475c7c15cfb9b3f2)
>---------------------------------------------------------------
6bee8644d959ec77745d835c8c4453f2147bd8d7
rts/package.conf.in | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/rts/package.conf.in b/rts/package.conf.in
index 5c6d240..c0256bb 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -2,6 +2,7 @@
#include "ghcconfig.h"
#include "rts/Config.h"
+#include "MachDeps.h"
name: rts
version: 1.0
@@ -42,17 +43,7 @@ extra-libraries:
,"gdi32" /* for the linker */
,"winmm" /* for the linker */
#endif
-#ifdef freebsd_HOST_OS
- , "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
+ , "pthread" /* for pthread_getthreadid_np, pthread_create, etc. */
#if defined(DEBUG) && defined(HAVE_LIBBFD)
,"bfd", "iberty" /* for debugging */
#endif
More information about the ghc-commits
mailing list