Olaf Chitil writes:
> I'm using the -Ofile option to be able to call a transformation I added
> to GHC. I think that
> 

Great stuff - when compiling with -prof, one STG options that has to be
set is -fmassage-stg-for-profiling. This isn't done by the driver for
-Ofile (though it should be), so either you have to provide a separate
options file for -prof, or you have to patch the driver. I've appended
the patch (wrt. 2.05), if you should choose the latter.

HTH,

--Sigbjorn

*** fptools/ghc/driver/ghc.lprl.~1~     Wed Jul 30 14:40:12 1997
--- fptools/ghc/driver/ghc.lprl Mon Aug  4 15:41:56 1997
***************
*** 952,957 ****
--- 952,959 ----
  } else { # -Ofile, then...
  
      &add_Hsc_flags( @HsC_minusO3_flags );
+     push(@HsC_flags, $Oopt_FinalStgProfilingMassage) if 
+$Oopt_FinalStgProfilingMassage;
+ 
      push(@CcBoth_flags, ($MinusO2ForC) ? '-O2' : '-O');       # possibly to be 
elaborated...
  }

Reply via email to