summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2020-05-14 08:10:43 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2020-06-04 04:58:43 -0400
commitb455074875d3c8fd3a5787e01dc6f922f3a97bc2 (patch)
tree1f36306915b949a595bf2c2a216a84d397ed8d00
parentad44b50484f27beceab8213a061aa60c7a03f7ca (diff)
downloadhaskell-wip/angerman/ghc-prim-libs.tar.gz
ghc-prim needs to depend on libc and libmwip/angerman/ghc-prim-libs
libm is just an empty shell on musl, and all the math functions are contained in libc.
-rw-r--r--libraries/ghc-prim/ghc-prim.cabal5
1 files changed, 5 insertions, 0 deletions
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index 607f24df99..4ac3054b05 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -68,6 +68,11 @@ Library
-- on Windows. Required because of mingw32.
extra-libraries: user32, mingw32, mingwex
+ if os(linux)
+ -- we need libm, but for musl and other's we might need libc, as libm
+ -- is just an empty shell.
+ extra-libraries: c, m
+
c-sources:
cbits/atomic.c
cbits/bswap.c