blob: 9b321f5804989541fd71fc4dd5cf2dd8077ca3b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Fix underlinking on ghc-prim.
Fixes ghc-stage2 crahs on hardened toolchain.
Reported-by: aranea
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index ffb32af..0431380 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -65,3 +65,7 @@ Library
-- We need to set the package name to ghc-prim (without a version number)
-- as it's magic.
ghc-options: -package-name ghc-prim
+
+ -- ghc 'sin' (and other) primops generate 'libm' calls,
+ -- but ghc itself does not add '-lm'
+ extra-libraries: m
|