From 882e459f34c50e8a8d841178d6c8db54ca47add8 Mon Sep 17 00:00:00 2001 From: simonm <unknown> Date: Thu, 14 Jan 1999 17:15:46 +0000 Subject: [PATCH] [project @ 1999-01-14 17:15:46 by simonm] x86: only add -fomit-frame-pointer when compiling .hc files. It gets in the way of debugging for normal .c files. --- ghc/driver/ghc.lprl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 957c9009e225..ea51be1a6039 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -956,8 +956,7 @@ if ( $OptLevel <= 0 ) { &add_Hsc_flags( @HsC_minusO_flags ); push(@CcBoth_flags, ($MinusO2ForC || $OptLevel == 2) ? '-O2' : '-O'); # not optional! # -O? to GCC is not optional! -O2 probably isn't worth it generally, - # but it *is* useful in compiling the garbage collectors (so said - # Patrick many moons ago...). + # but it *is* useful in compiling the garbage collector. } else { # -Ofile, then... @@ -1106,12 +1105,11 @@ sub setupMachOpts { } elsif ($TargetPlatform =~ /^i386-/) { # -fno-defer-pop : basically the same game as for m68k # - # -fomit-frame-pointer : *must* ; because we're stealing - # the fp (%ebp) for our register maps. *All* register - # maps (in MachRegs.lh) must steal it. + # -fomit-frame-pointer : *must* in .hc files; because we're stealing + # the fp (%ebp) for our register maps. unshift(@CcRegd_flags_hc, '-fno-defer-pop'); - unshift(@CcRegd_flags, '-fomit-frame-pointer'); + unshift(@CcRegd_flags_hc, '-fomit-frame-pointer'); unshift(@CcRegd_flags, "-DSTOLEN_X86_REGS=$StolenX86Regs"); } elsif ($TargetPlatform =~ /^m68k-/) { @@ -2290,7 +2288,7 @@ sub process_ghc_timings { local($tot_samples) = 0; while (<STATS>) { - if (! /Minor/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+\%/ ) { + if (! /Gen:\s+0/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+/ ) { $max_live = $1 if $max_live < $1; $tot_live += $1; $tot_samples += 1; -- GitLab