termux-packages/packages/ghc-libs/always_link_m.patch

27 lines
798 B
Diff

--- ghc-8.10.7/rts/package.conf.in 2021-08-18 17:30:16.000000000 +0530
+++ ghc-8.10.7-patch/rts/package.conf.in 2022-02-02 15:19:26.221569951 +0530
@@ -26,9 +26,7 @@
hs-libraries: "HSrts" FFI_LIB
extra-libraries:
-#if defined(HAVE_LIBM)
"m" /* for ldexp() */
-#endif
#if defined(HAVE_LIBRT)
, "rt"
#endif
--- ghc.orig/compiler/GHC/Linker/Dynamic.hs 2022-11-07 01:10:29.000000000 +0530
+++ ghc.mod/compiler/GHC/Linker/Dynamic.hs 2022-11-10 13:19:22.885682312 +0530
@@ -229,11 +229,7 @@
-- math-y things are used (which we assume to include all programs). See #14022.
libmLinkOpts :: [Option]
libmLinkOpts =
-#if defined(HAVE_LIBM)
[Option "-lm"]
-#else
- []
-#endif
{-
Note [-Bsymbolic assumptions by GHC]