Ticket #8748: ghc-HEAD-NOSMP-for-hc.patch

File ghc-HEAD-NOSMP-for-hc.patch, 1007 bytes (added by slyfox, 4 years ago)

ghc-HEAD-NOSMP-for-hc.patch - add -DNOSMP for .hs compiler

  • compiler/ghc.mk

    Fix --enable-unregisterised build by passing NOSMP down to .hc C compiler
    
      HC [stage 1] compiler/stage2/build/ExtsCompat46.o
    
    In file included from /home/slyfox/dev/git/ghc/includes/Stg.h:232:0:
        0,
                         from /tmp/ghc6527_0/ghc6527_2.hc:3:
    
    /home/slyfox/dev/git/ghc/includes/stg/Regs.h:443:2:
         error: #error BaseReg must be in a register for THREADED_RTS
         #error BaseReg must be in a register for THREADED_RTS
    
    diff --git a/compiler/ghc.mk b/compiler/ghc.mk
    index 0a18713..4977e28 100644
    a b else 
    353353compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS
    354354endif
    355355
     356ifneq "$(GhcWithSMP)" "YES"
     357compiler_CONFIGURE_OPTS += --ghc-option=-DNOSMP
     358compiler_CONFIGURE_OPTS += --ghc-option=-optc-DNOSMP
     359endif
     360
    356361# Careful optimisation of the parser: we don't want to throw everything
    357362# at it, because that takes too long and doesn't buy much, but we do want
    358363# to inline certain key external functions, so we instruct GHC not to