Ticket #96: ghc-no-omit-lfp.2.patch

File ghc-no-omit-lfp.2.patch, 1.8 KB (added by jenglish, 11 years ago)
  • mk/bootstrap.mk

    old new  
    2727 
    2828ifeq "$(i386_TARGET_ARCH)" "1" 
    2929PLATFORM_CC_OPTS += -DDONT_WANT_WIN32_DLL_SUPPORT 
    30 PLATFORM_HC_BOOT_CC_OPTS += -fno-defer-pop -fomit-frame-pointer  
     30PLATFORM_HC_BOOT_CC_OPTS += -fno-defer-pop -fomit-frame-pointer -mno-omit-leaf-frame-pointer 
    3131endif 
    3232 
    3333ifeq "$(hppa_TARGET_ARCH)" "1" 
  • mk/config.mk.in

    old new  
    309309 
    310310# For an optimised RTS: 
    311311GhcRtsHcOpts=-O2 
    312 GhcRtsCcOpts=-fomit-frame-pointer 
     312GhcRtsCcOpts=-fomit-frame-pointer -mno-omit-leaf-frame-pointer 
    313313 
    314314# Include the front panel code?  Needs GTK+. 
    315315GhcRtsWithFrontPanel = NO 
  • ghc/compiler/main/DriverFlags.hs

    old new  
    562562      -- 
    563563      -- -fomit-frame-pointer : *must* in .hc files; because we're stealing 
    564564      --   the fp (%ebp) for our register maps. 
     565      -- 
     566      -- -mno-omit-leaf-frame-pointer: -momit-leaf-frame-pointer 
     567      -- takes precedence over -fomit-frame-pointer. gcc-3.2mdk 
     568      -- turns it on by default, so we have to turn it off. 
     569      -- 
    565570        = do n_regs <- dynFlag stolen_x86_regs 
    566571             sta    <- readIORef v_Static 
    567572             return ( [ if sta then "-DDONT_WANT_WIN32_DLL_SUPPORT" else "" 
    568573--                    , if suffixMatch "mingw32" cTARGETPLATFORM then "-mno-cygwin" else ""  
    569574                      ], 
    570575                      [ "-fno-defer-pop", "-fomit-frame-pointer", 
     576                        "-mno-omit-leaf-frame-pointer", 
    571577                        -- we want -fno-builtin, because when gcc inlines 
    572578                        -- built-in functions like memcpy() it tends to 
    573579                        -- run out of registers, requiring -monly-n-regs