summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-12-23 11:14:53 -0500
committerBen Gamari <ben@smart-cactus.org>2022-01-10 14:29:03 -0500
commit7b252b6db8f8f3cbf457f103b119e14c35a12b7c (patch)
treeb1f4086f548bcdedc98e14eb77695204aa09e32b
parentf583eb8e5e7077f77fba035a454fafd945d4a4ea (diff)
downloadhaskell-wip/T19029.tar.gz
rts: Depend explicitly on libcwip/T19029
As noted in #19029, currently `ghc-prim` explicitly lists `libc` in `extra-libraries`, resulting in incorrect link ordering with the `extra-libraries: pthread` in `libHSrts`. Fix this by adding an explicit dependency on `libc` to `libHSrts`. Closes #19029.
-rw-r--r--rts/rts.cabal.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 0b57c290bf..9e998bb911 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -109,6 +109,12 @@ library
exposed: True
exposed-modules:
+ if os(linux)
+ -- the RTS depends upon libc. while this dependency is generally
+ -- implicitly added by `cc`, we must explicitly add it here to ensure
+ -- that it is ordered correctly with libpthread, since ghc-prim.cabal
+ -- also explicitly lists libc. See #19029.
+ extra-libraries: c
if flag(libm)
-- for ldexp()
extra-libraries: m