[project @ 2002-10-17 14:26:16 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index 7c6ebaa..e50f07b 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.101 2002/08/29 15:44:15 simonmar Exp $
+-- $Id: DriverFlags.hs,v 1.105 2002/10/17 14:26:17 simonmar Exp $
 --
 -- Driver flags
 --
@@ -229,7 +229,7 @@ static_flags =
        ------- Output Redirection ------------------------------------------
   ,  ( "odir"          , HasArg (writeIORef v_Output_dir  . Just) )
   ,  ( "o"             , SepArg (writeIORef v_Output_file . Just) )
-  ,  ( "osuf"          , HasArg (writeIORef v_Object_suf  . Just) )
+  ,  ( "osuf"          , HasArg (writeIORef v_Object_suf) )
   ,  ( "hcsuf"         , HasArg (writeIORef v_HC_suf      . Just) )
   ,  ( "hisuf"         , HasArg (writeIORef v_Hi_suf) )
   ,  ( "hidir"         , HasArg (writeIORef v_Hi_dir . Just) )
@@ -400,6 +400,7 @@ dynamic_flags = [
   ,  ( "dshow-passes",           NoArg (setVerbosity "2") )
   ,  ( "ddump-rn-trace",         NoArg (setDynFlag Opt_D_dump_rn_trace) )
   ,  ( "ddump-tc-trace",         NoArg (setDynFlag Opt_D_dump_tc_trace) )
+  ,  ( "ddump-splices",          NoArg (setDynFlag Opt_D_dump_splices) )
   ,  ( "ddump-rn-stats",         NoArg (setDynFlag Opt_D_dump_rn_stats) )
   ,  ( "ddump-stix",             NoArg (setDynFlag Opt_D_dump_stix) )
   ,  ( "ddump-simpl-stats",      NoArg (setDynFlag Opt_D_dump_simpl_stats) )
@@ -493,8 +494,13 @@ decodeSize str
 -----------------------------------------------------------------------------
 -- RTS Hooks
 
+#if __GLASGOW_HASKELL__ >= 504
+foreign import ccall unsafe "setHeapSize"       setHeapSize       :: Int -> IO ()
+foreign import ccall unsafe "enableTimingStats" enableTimingStats :: IO ()
+#else
 foreign import "setHeapSize"       unsafe setHeapSize       :: Int -> IO ()
 foreign import "enableTimingStats" unsafe enableTimingStats :: IO ()
+#endif
 
 -----------------------------------------------------------------------------
 -- Build the Hsc static command line opts
@@ -592,7 +598,15 @@ machdepCCOpts
        -- disable all warnings altogether using the -w flag. Oh well.
 
    | prefixMatch "powerpc-apple-darwin" cTARGETPLATFORM
-       = return ( ["-no-cpp-precomp"], [""] )
+      -- -no-cpp-precomp:
+      --     Disable Apple's precompiling preprocessor. It's a great thing
+      --     for "normal" programs, but it doesn't support register variable
+      --     declarations.
+      -- -mdynamic-no-pic:
+      --     As we don't support haskell code in shared libraries anyway,
+      --     we might as well turn of PIC code generation and save space and time.
+      --     This is completely optional.
+       = return ( ["-no-cpp-precomp","-mdynamic-no-pic"], [] )
 
    | prefixMatch "powerpc" cTARGETPLATFORM || prefixMatch "rs6000" cTARGETPLATFORM
        = return ( ["-static"], ["-finhibit-size-directive"] )