[project @ 2001-07-24 10:31:07 by simonmar]
[ghc-hetmet.git] / ghc / driver / PackageSrc.hs
index 11b4cbf..3c3151f 100644 (file)
@@ -65,7 +65,7 @@ package_details installing
                             else [ ghc_src_dir cGHC_RUNTIME_DIR ],
         hs_libraries      = [ "HSrts" ],
 #ifndef mingw32_TARGET_OS
-       extra_libraries   = [],
+       extra_libraries   = [ "m" ], -- libm, that is, for ldexp()
 #else
         extra_libraries   = [ "winmm", "wsock32" ], -- winmm for the threadDelay timer, wsock32 for the linker
 #endif
@@ -82,11 +82,13 @@ package_details installing
         extra_cc_opts  = [],
                 -- the RTS forward-references to a bunch of stuff in the prelude,
                 -- so we force it to be included with special options to ld.
-        extra_ld_opts  = map (
+        extra_ld_opts  =
+          foldr (\ x xs -> "-u" : x : xs) []
+                 (map (
 #ifndef LEADING_UNDERSCORE
-                         "-u "
+                         ""
 #else
-                         "-u _"
+                         "_"
 #endif
                           ++ ) [
            "PrelBase_Izh_static_info"
@@ -119,7 +121,7 @@ package_details installing
          , "PrelIOBase_BlockedOnDeadMVar_closure"
          , "PrelWeak_runFinalizzerBatch_closure"
          , "__init_Prelude"
-         ]
+         ])
         },
 
         Package {
@@ -148,7 +150,7 @@ package_details installing
 #                           ifdef mingw32_TARGET_OS
                             [ "wsock32", "msvcrt" ]
 #                           else
-                            [ "m" ]   -- libm, that is
+                            [ ]
 #                           endif
                             ,
         include_dirs   = if installing
@@ -183,9 +185,9 @@ package_details installing
          extra_cc_opts  = [],
          extra_ld_opts  = [
 #ifndef LEADING_UNDERSCORE
-                         "-u Addr_Azh_static_info"
+                         "-u", "Addr_Azh_static_info"
 #else
-                         "-u _Addr_Azh_static_info"
+                         "-u", "_Addr_Azh_static_info"
 #endif
                        ]
         },