summaryrefslogtreecommitdiff
path: root/rts/package.conf.in
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-02-26 19:28:08 -0500
committerBen Gamari <ben@smart-cactus.org>2017-02-28 09:26:14 -0500
commite94bfb677298de3c4b4e0d1223fbc589849b79be (patch)
tree8d08b958316bc74f64f3dd9bc57e4427c7238901 /rts/package.conf.in
parent36b6e131d252814bca8bf7e684e50466dc12483b (diff)
downloadhaskell-e94bfb677298de3c4b4e0d1223fbc589849b79be.tar.gz
configure: detect whether -lpthreads is necessary for pthreads
Some platforms have pthreads support available without linking against libpthread (and indeed don't even offer a libpthread to link against). One example of this is Android's bionic library. Teach the RTS about this case. Test Plan: Validate while cross-compiling targetting Android on aarch64 Reviewers: simonmar, austin, hvr, erikd, rwbarton Subscribers: danharaj, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3149
Diffstat (limited to 'rts/package.conf.in')
-rw-r--r--rts/package.conf.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/package.conf.in b/rts/package.conf.in
index 338fcb1abf..02437aec06 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -46,7 +46,9 @@ extra-libraries:
,"gdi32" /* for the linker */
,"winmm" /* for the linker */
#endif
+#if NEED_PTHREAD_LIB
, "pthread" /* for pthread_getthreadid_np, pthread_create, etc. */
+#endif
#if defined(DEBUG) && defined(HAVE_LIBBFD)
,"bfd", "iberty" /* for debugging */
#endif