[project @ 2002-07-29 10:42:29 by simonmar]
authorsimonmar <unknown>
Mon, 29 Jul 2002 10:42:29 +0000 (10:42 +0000)
committersimonmar <unknown>
Mon, 29 Jul 2002 10:42:29 +0000 (10:42 +0000)
Add -static to the linker command line when -static is passed to GHC.

At some point we might want a way to say that Haskell libraries should
be linked statically but everything else should be linked as normal,
but since we aren't really supporting dynamic Haskell libraries at
this time, we don't need to address that yet.

ghc/compiler/main/DriverPipeline.hs

index c2d4235..944802e 100644 (file)
@@ -949,6 +949,7 @@ doLink o_files = do
 #endif
                      ++ pkg_extra_ld_opts
                      ++ extra_ld_opts
+                     ++ (if static then [ "-static" ] else [])
                      ++ if static && not no_hs_main then
                            [ "-u", prefixUnderscore "Main_zdmain_closure"] 
                         else []))