[project @ 2004-10-18 18:24:59 by igloo]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index c09e43a..ac9e92c 100644 (file)
@@ -441,6 +441,7 @@ fFlags = [
   ( "warn-duplicate-exports",          Opt_WarnDuplicateExports ),
   ( "warn-hi-shadowing",               Opt_WarnHiShadows ),
   ( "warn-incomplete-patterns",        Opt_WarnIncompletePatterns ),
+  ( "warn-incomplete-record-updates",          Opt_WarnIncompletePatternsRecUpd ),
   ( "warn-missing-fields",             Opt_WarnMissingFields ),
   ( "warn-missing-methods",            Opt_WarnMissingMethods ),
   ( "warn-missing-signatures",         Opt_WarnMissingSigs ),
@@ -621,11 +622,20 @@ machdepCCOpts
       --     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"], [] )
-
+      --     Turn off PIC code generation to save space and time.
+      -- -fno-common:
+      --     Don't generate "common" symbols - these are unwanted
+      --     in dynamic libraries.
+
+        = if opt_PIC
+            then return ( ["-no-cpp-precomp", "-fno-common"],
+                          ["-fno-common"] )
+            else return ( ["-no-cpp-precomp", "-mdynamic-no-pic"],
+                          ["-mdynamic-no-pic"] )
+
+   | prefixMatch "powerpc" cTARGETPLATFORM && opt_PIC
+        = return ( ["-fPIC"], ["-fPIC"] )
+  
    | otherwise
        = return ( [], [] )