diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-12-23 11:14:53 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-11 19:38:56 -0500 |
commit | 6737c8e1ed67a2ec3f1fa3e91cb279f689d3da6f (patch) | |
tree | d95ecea9eeaf0f6afaef65e586dda6e1a05d3a6a /rts | |
parent | 759f3421b5c1dbea358208337541eef674441af6 (diff) | |
download | haskell-6737c8e1ed67a2ec3f1fa3e91cb279f689d3da6f.tar.gz |
rts: Depend explicitly on libc
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.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/rts.cabal.in | 6 |
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 |