summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-06 20:23:04 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-13 06:10:57 +0000
commitab2779b5cba0dc511b8c2bafedff20d8b1577891 (patch)
tree79cc1f9404c1a521a91ebc7c162064cd87a07729
parent6900174b5102ca317905c4a029a8f1489260be39 (diff)
downloadhaskell-wip/rts-configure-cabal-file.tar.gz
Revert "TEMP PTHREAD"wip/rts-configure-cabal-file
This reverts commit 7097474fc9a4aaefee743e3739fb10846681a9dc.
-rw-r--r--configure.ac6
-rw-r--r--m4/fp_check_pthreads.m44
-rw-r--r--rts/rts.buildinfo.in2
-rw-r--r--rts/rts.cabal.in5
4 files changed, 6 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 7fde4a26e5..ca871660a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -954,12 +954,6 @@ dnl ** check for leading underscores in symbol names
FP_LEADING_UNDERSCORE
AC_SUBST([LeadingUnderscore], [`echo $fptools_cv_leading_underscore | sed 'y/yesno/YESNO/'`])
-FP_CHECK_PTHREADS
-AS_IF([test x"$need_lpthread" = 1],
- [CabalNeedLibpthread=True],
- [CabalNeedLibpthread=False])
-AC_SUBST([CabalNeedLibpthread])
-
GHC_ADJUSTORS_METHOD([Target])
AC_SUBST([UseLibffiForAdjustors])
diff --git a/m4/fp_check_pthreads.m4 b/m4/fp_check_pthreads.m4
index 68f17177c3..a93496f614 100644
--- a/m4/fp_check_pthreads.m4
+++ b/m4/fp_check_pthreads.m4
@@ -27,6 +27,10 @@ AC_DEFUN([FP_CHECK_PTHREADS],
])
AC_DEFINE_UNQUOTED([NEED_PTHREAD_LIB], [$need_lpthread],
[Define 1 if we need to link code using pthreads with -lpthread])
+ AS_IF([test x"$need_lpthread" = 1],
+ [PTHREAD_LIB=pthread],
+ [PTHREAD_LIB=''])
+ AC_SUBST([PTHREAD_LIB])
dnl Setting thread names
dnl ~~~~~~~~~~~~~~~~~~~~
diff --git a/rts/rts.buildinfo.in b/rts/rts.buildinfo.in
index e69de29bb2..2092a9a986 100644
--- a/rts/rts.buildinfo.in
+++ b/rts/rts.buildinfo.in
@@ -0,0 +1,2 @@
+-- for pthread_getthreadid_np, pthread_create, ...
+extra-libraries: @PTHREAD_LIB@
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index a443b1eaae..c6ec25af71 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -16,8 +16,6 @@ flag libdl
flag use-system-libffi
default: @CabalUseSystemLibFFI@
flag libffi-adjustors
-flag need-pthread
- default: @CabalNeedLibpthread@
flag libbfd
default: @CabalHaveLibbfd@
flag mingwex
@@ -133,9 +131,6 @@ library
-- and also centralizes the versioning.
cpp-options: -D_WIN32_WINNT=0x06010000
cc-options: -D_WIN32_WINNT=0x06010000
- if flag(need-pthread)
- -- for pthread_getthreadid_np, pthread_create, ...
- extra-libraries: pthread
if flag(need-atomic)
-- for sub-word-sized atomic operations (#19119)
extra-libraries: atomic