[project @ 2001-08-23 08:45:50 by rrt]
[ghc-hetmet.git] / ghc / driver / PackageSrc.hs
index 11b4cbf..5c9d3e4 100644 (file)
@@ -1,4 +1,5 @@
 #include "../includes/config.h"
+#include "../includes/Derived.h"
 
 module Main (main) where
 
@@ -64,11 +65,16 @@ package_details installing
                             then [ "$libdir" ]
                             else [ ghc_src_dir cGHC_RUNTIME_DIR ],
         hs_libraries      = [ "HSrts" ],
-#ifndef mingw32_TARGET_OS
-       extra_libraries   = [],
-#else
-        extra_libraries   = [ "winmm", "wsock32" ], -- winmm for the threadDelay timer, wsock32 for the linker
+       extra_libraries   =
+                             "m":              -- for ldexp()
+#ifdef mingw32_TARGET_OS
+                             "winmm":          -- for the threadDelay timer
+                             "wsock32":        -- for the linker
+#endif
+#ifdef USING_LIBBFD
+                             "bfd": "iberty":  -- for debugging
 #endif
+                           [],
         include_dirs   = if installing
                             then [ "$libdir/include"
 #ifdef mingw32_TARGET_OS
@@ -82,11 +88,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 +127,7 @@ package_details installing
          , "PrelIOBase_BlockedOnDeadMVar_closure"
          , "PrelWeak_runFinalizzerBatch_closure"
          , "__init_Prelude"
-         ]
+         ])
         },
 
         Package {
@@ -148,7 +156,7 @@ package_details installing
 #                           ifdef mingw32_TARGET_OS
                             [ "wsock32", "msvcrt" ]
 #                           else
-                            [ "m" ]   -- libm, that is
+                            [ ]
 #                           endif
                             ,
         include_dirs   = if installing
@@ -183,9 +191,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
                        ]
         },
@@ -393,7 +401,7 @@ package_details installing
         extra_libraries   = [ "user32",  "gdi32", "winmm" ],
          include_dirs   = [],
          c_includes     = [],           -- ???
-         package_deps   = [ "lang", "greencard" ],
+         package_deps   = [ "lang" ], -- greencard now built in
          extra_ghc_opts = [],
          extra_cc_opts  = [],
          extra_ld_opts  = []