[project @ 2000-03-08 17:48:24 by simonmar]
[ghc-hetmet.git] / ghc / driver / ghc.lprl
index f07b251..e3eb56b 100644 (file)
@@ -12,6 +12,8 @@ It is written in \tr{perl}.  The first section includes a long
 %************************************************************************
 
 \begin{code}
+use 5;   # require Perl version 5 or later.
+
 ($Pgm = $0) =~ s|.*/||;
 $ShortUsage  =  "\nUsage: For basic information, try the `-help' option.\n";
 $LongUsage = "\n" . <<EOUSAGE;
@@ -272,6 +274,8 @@ warnings that you get all the time are
        
        -fwarn-overlapping-patterns
        -fwarn-missing-methods
+       -fwarn-missing-fields
+       -fwarn-deprecations
        -fwarn-duplicate-exports
 
 these are turned off by -Wnot.
@@ -280,6 +284,7 @@ these are turned off by -Wnot.
 @StandardWarnings = ('-fwarn-overlapping-patterns', 
                     '-fwarn-missing-methods',
                     '-fwarn-missing-fields',
+                    '-fwarn-deprecations',
                     '-fwarn-duplicate-exports');
 @MinusWOpts              = (@StandardWarnings, 
                     '-fwarn-unused-binds',
@@ -473,7 +478,6 @@ $CollectingGCstats = 0;
 $CollectGhcTimings = 0;
 $DEBUGging = '';       # -DDEBUG and all that it entails (um... not really)
 $PROFing = '';         # set to p or e if profiling
-$PROFgroup = '';       # set to group if an explicit -Ggroup specified
 $PROFauto = '';                # set to relevant hsc flag if -auto or -auto-all
 $PROFcaf  = '';                # set to relevant hsc flag if -caf-all
 $PROFdict = '';                # set to relevant hsc flag if -auto-dicts
@@ -690,7 +694,6 @@ sub setupOptimiseFlags {
     = (        
        '-fsimplify',
          '[', 
-               '-finline-phase2',
                $Oopt_MaxSimplifierIterations,
          ']',
 
@@ -1099,19 +1102,19 @@ sub setupLinkOpts {
           ,'-u', "${uscore}PrelException_stackOverflow_closure"
           ,'-u', "${uscore}PrelException_heapOverflow_closure"
           ,'-u', "${uscore}PrelException_NonTermination_static_closure"
+          ,'-u', "${uscore}__init_Prelude"
        ));
   if (!$NoHaskellMain) {
    unshift (@Ld_flags,'-u', "${uscore}PrelMain_mainIO_closure");
   }
-  if ($PROFing ne '') {
-   unshift (@Ld_flags,'-u', "${uscore}_regPrelude");
-  }
   if ($TargetPlatform =~ /^powerpc-|^rs6000-/) {
     # sometimes we have lots of toc entries...
     #  unshift(@Ld_flags, ('-Xlinker -bbigtoc -Xlinker -bnoquiet')); 
     unshift(@Ld_flags, ('-Xlinker -bbigtoc')); 
   }
-
+  if ($TargetPlatform =~ /^hppa/) {
+    unshift(@Ld_flags, ('-Xlinker +vnocompatwarnings'));
+  }
 
 } # end of setupLinkOpts
 
@@ -1912,6 +1915,7 @@ eval 'exec perl -S \$0 \${1+"\$@"}'
 # =!=!=!=!=!=!=!=!=!=!=!
 # This script is automatically generated: DO NOT EDIT!!!
 # Generated by Glasgow Haskell, version ${ProjectVersion}
+# ngoqvam choHbogh vaj' vIHoHnISbej !!!!
 #
 \$pvm_executable      = '$pvm_executable';
 \$pvm_executable_base = '$pvm_executable_base';
@@ -1943,7 +1947,9 @@ args: while ($a = shift(@ARGV)) {
     }
     if ( $a eq '-d' && $in_RTS_args ) {
        $debug = '-';
-    } elsif ( $a =~ /^-N(\d+)/ && $in_RTS_args ) {
+    } elsif ( $a =~ /^-qN(\d+)/ && $in_RTS_args ) {
+       $nprocessors = $1;
+    } elsif ( $a =~ /^-qp(\d+)/ && $in_RTS_args ) {
        $nprocessors = $1;
     } else {
        push(@nonPVM_args, $a);
@@ -2169,7 +2175,7 @@ sub runAs {
     # need to add the -I flags in case the file is going through cpp (.S files)
     local($includes) = '-I' . join(' -I', @Include_dir);
 
-    if ( ! $SplitObjFiles ) {
+   if ( ! $SplitObjFiles || $ifile_root =~ /_stub\.s$/ ) {
        local($to_do)  = "$asmblr -o $as_out -c @As_flags $includes $cc_as";
        push(@Files_to_tidy, $as_out );
        &run_something($to_do, 'Unix assembler');
@@ -2601,7 +2607,7 @@ sub add_syslib {
        [  # where to slurp interface files from
          ( $INSTALLING 
               ? "$InstLibDirGhc/imports/text"
-              : "$TopPwd/hslibs/text:$TopPwd/hslibs/text/html"
+              : "$TopPwd/hslibs/text:$TopPwd/hslibs/text/html:$TopPwd/hslibs/text/haxml/lib"
          )
        , # where to find the archive to use when linking
          ( $INSTALLING 
@@ -2613,7 +2619,7 @@ sub add_syslib {
               ? "$InstLibDirGhc"
               : "$TopPwd/hslibs/text/cbits"
          )
-       , 'lang' # Syslib dependencies
+       , 'lang data' # Syslib dependencies
        , '' # extra ghc opts
        , '' # extra cc opts
        , '' # extra ld opts
@@ -2818,9 +2824,24 @@ sub saveIntermediate {
   local ($final,$suffix,$tmp)= @_ ;
   local ($to_do);
 
+  local ($new_suffix);
+
   # $final  -- root of where to park ${final}.${suffix}
   # $tmp    -- temporary file where hsc put the intermediate file.
 
+  # HWL: use -odir for .hc and .s files, too
+  if ( $Specific_output_dir ne '' ) {
+    $final = "${Specific_output_dir}/${final}";
+  }    
+  # HWL: use the same suffix as for $Osuffix in generating intermediate file,
+  #      replacing o with hc or s, respectively. 
+  if ( $Osuffix ne '' ) {
+    ($new_suffix = $Osuffix) =~ s/o$/hc/ if $suffix eq "hc";
+    ($new_suffix = $Osuffix) =~ s/o$/s/ if $suffix eq "s";
+    $suffix = $new_suffix;
+    print stderr "HWL says: suffix for intermediate file is $suffix; ${final}.${suffix} overall\n" if $Verbose;
+  }
+
   # Delete the old file
   $to_do = "$Rm ${final}.${suffix}"; &run_something($to_do, "Removing old .${suffix} file");
 
@@ -3011,9 +3032,6 @@ arg: while($_ = $Args[0]) {
                $PROFignore_scc = '-W';
                next arg; };
 
-    /^-G(.*)$/ && do { push(@HsC_flags, "-G=$1");   # set group for cost centres
-                       next arg; };
-
     /^-unprof-scc-auto/ && do {
                # generate auto SCCs on top level bindings when not profiling.
                # Used to measure optimisation effects of presence of sccs.