[project @ 2000-05-31 10:13:57 by lewie]
[ghc-hetmet.git] / ghc / driver / ghc.lprl
index 8f90eba..b292910 100644 (file)
@@ -284,6 +284,7 @@ warnings that you get all the time are
        -fwarn-missing-fields
        -fwarn-deprecations
        -fwarn-duplicate-exports
+       -fwarn-hi-shadowing
 
 these are turned off by -Wnot.
 
@@ -292,6 +293,7 @@ these are turned off by -Wnot.
                     '-fwarn-missing-methods',
                     '-fwarn-missing-fields',
                     '-fwarn-deprecations',
+# DISABLE DUE TO DUPLICATE INCLUDE PATHS (ToDo): '-fwarn-hi-shadowing',
                     '-fwarn-duplicate-exports');
 @MinusWOpts              = (@StandardWarnings, 
                     '-fwarn-unused-binds',
@@ -1114,6 +1116,7 @@ sub setupLinkOpts {
           ,'-u', "${uscore}PrelException_NonTermination_closure"
           ,'-u', "${uscore}PrelException_PutFullMVar_closure"
           ,'-u', "${uscore}PrelException_BlockedOnDeadMVar_closure"
+          ,'-u', "${uscore}PrelWeak_runFinalizzerBatch_closure"
           ,'-u', "${uscore}__init_Prelude"
           ,'-u', "${uscore}__init_PrelMain"
        ));
@@ -1681,7 +1684,7 @@ sub runHscAndProcessInterfaces {
    # See if it bailed out early, saying nothing needed doing.  
    # We work this out by seeing if it created an output .hi file
 
-    if ( ! -f $hsc_hi && $ProduceHi !~ /-nohifile=/ ) {
+    if ( ! -f $hsc_out ) {
        # Doesn't exist, so we bailed out early.
        # Tell the C compiler and assembler not to run
        $do_cc = 0; $do_as = 0;
@@ -1718,10 +1721,14 @@ sub runHscAndProcessInterfaces {
 
 
        # Interface-handling is important enough to live off by itself
-        if ( $ProduceHi !~ /-nohifile=/ ) { # If we've produced one, process it.
-          require('ghc-iface.prl') || &tidy_up_and_die(1,"$Pgm: panic: can't load ghc-iface.prl!\n");
-          &postprocessHiFile($hsc_hi, $hifile_target, $going_interactive);
+       if ( -f $hsc_hi ) {
+               # print STDERR "Aha! A new hi file\n" ;
+               &run_something( "mv $hsc_hi $hifile_target", "Copy hi file" ) ;
+       } else {
+               # print STDERR "Oh ho! Hi file unchanged\n" ;
        }
+
+
        # if we're going to split up object files,
        # we inject split markers into the .hc file now
        if ( $HscLang eq 'C' && $SplitObjFiles ) {
@@ -2621,7 +2628,7 @@ sub add_syslib {
        [  # where to slurp interface files from
          ( $INSTALLING 
               ? "$InstLibDirGhc/imports/text"
-              : "$TopPwd/hslibs/text:$TopPwd/hslibs/text/html:$TopPwd/hslibs/text/haxml/lib"
+              : "$TopPwd/hslibs/text:$TopPwd/hslibs/text/html:$TopPwd/hslibs/text/haxml/lib:$TopPwd/hslibs/text/parsec"
          )
        , # where to find the archive to use when linking
          ( $INSTALLING 
@@ -3275,7 +3282,13 @@ arg: while($_ = $Args[0]) {
 
     # --------------- Warnings etc. ------
 
-    /^-fwarn-(.*)$/      && do { push(@HsC_flags, $_); next arg; };
+    /^-fwarn-(.*)$/ && do { if (!grep(/$1/,@MinusWallOpts)) {
+                               print STDERR "$Pgm: unrecognised warning option: $_\n";
+                               $Status++;
+                           } else {                            
+                               push(@HsC_flags, $_); 
+                           }
+                           next arg; };
 
     /^-fno-(.*)$/   && do { push(@HsC_antiflags, "-f$1");
                            &squashHscFlag("-f$1");