diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-02-26 19:28:08 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-28 09:26:14 -0500 |
commit | e94bfb677298de3c4b4e0d1223fbc589849b79be (patch) | |
tree | 8d08b958316bc74f64f3dd9bc57e4427c7238901 /rts/package.conf.in | |
parent | 36b6e131d252814bca8bf7e684e50466dc12483b (diff) | |
download | haskell-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.in | 2 |
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 |