summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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