[project @ 2001-09-25 18:08:47 by ken]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index e9b2a80..b696abe 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -#include "hschooks.h" #-}
 
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.66 2001/08/17 17:18:52 apt Exp $
+-- $Id: DriverFlags.hs,v 1.72 2001/09/25 18:08:47 ken Exp $
 --
 -- Driver flags
 --
@@ -76,8 +76,8 @@ processArgs _spec [] spare = return (reverse spare)
 
 processArgs spec args@(('-':arg):args') spare = do
   case findArg spec arg of
-    Just (rest,action) ->  do args' <- processOneArg action rest args
-                             processArgs spec args' spare
+    Just (rest,action) -> do args' <- processOneArg action rest args
+                            processArgs spec args' spare
     Nothing           -> processArgs spec args' (('-':arg):spare)
 
 processArgs spec (arg:args) spare = 
@@ -272,6 +272,9 @@ static_flags =
   ,  ( "fmax-simplifier-iterations", 
                Prefix (writeIORef v_MaxSimplifierIterations . read) )
 
+  ,  ( "frule-check", 
+               SepArg (\s -> writeIORef v_RuleCheck (Just s)) )
+
   ,  ( "fusagesp"         , NoArg (do writeIORef v_UsageSPInf True
                                       add v_Opt_C "-fusagesp-on") )
 
@@ -482,7 +485,10 @@ buildStaticHscOpts = do
 
 machdepCCOpts 
    | prefixMatch "alpha"   cTARGETPLATFORM  
-       = return ( ["-static", "-Xlinker -noprefix_recognition"], [] )
+       = return ( ["-static", "-w"], ["-mieee"] )
+       -- For now, to suppress the gcc warning "call-clobbered
+       -- register used for global register variable", we simply
+       -- disable all warnings altogether using the -w flag. Oh well.
 
    | prefixMatch "hppa"    cTARGETPLATFORM  
         -- ___HPUX_SOURCE, not _HPUX_SOURCE, is #defined if -ansi!
@@ -517,6 +523,12 @@ machdepCCOpts
    | prefixMatch "mips"    cTARGETPLATFORM
        = return ( ["-static"], [] )
 
+   | prefixMatch "sparc"    cTARGETPLATFORM
+       = return ( [], ["-w"] )
+       -- For now, to suppress the gcc warning "call-clobbered
+       -- register used for global register variable", we simply
+       -- disable all warnings altogether using the -w flag. Oh well.
+
    | prefixMatch "powerpc" cTARGETPLATFORM || prefixMatch "rs6000" cTARGETPLATFORM
        = return ( ["-static"], ["-finhibit-size-directive"] )