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

31 lines
991 B
Diff

diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index b3312b0..b0e3d90 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -414,11 +414,7 @@ linkDynLib dflags0 o_files dep_packages
-- 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
getPkgFrameworkOpts :: DynFlags -> Platform -> [InstalledUnitId] -> IO [String]
getPkgFrameworkOpts dflags platform dep_packages
diff --git a/rts/package.conf.in b/rts/package.conf.in
index e4cb159..7a234cd 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -26,9 +26,7 @@ library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR
hs-libraries: "HSrts" FFI_LIB
extra-libraries:
-#if defined(HAVE_LIBM)
"m" /* for ldexp() */
-#endif
#if defined(HAVE_LIBRT)
, "rt"
#endif