diff options
| author | Ian Lynagh <ian@well-typed.com> | 2012-10-27 13:37:45 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2012-10-27 13:37:45 +0100 |
| commit | 3a0a3151e1194f2330b2ea52c659bb020d75a78c (patch) | |
| tree | eca99a39002a12b879611a82bcf62f9da15bb7e8 | |
| parent | fb1b2c7d8064ab714ce7d0c674034a88e658672c (diff) | |
| download | haskell-3a0a3151e1194f2330b2ea52c659bb020d75a78c.tar.gz | |
Fix build on platforms on which we don't have register info
| -rw-r--r-- | includes/ghc.mk | 5 | ||||
| -rw-r--r-- | includes/stg/RtsMachRegs.h | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk index dd38a6d6c0..85df1da8b9 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -34,7 +34,7 @@ includes_H_FILES := $(subst /./,/,$(includes_H_FILES)) # Options # ifeq "$(GhcUnregisterised)" "YES" -includes_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER +includes_CC_OPTS += -DUSE_MINIINTERPRETER endif includes_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) @@ -125,6 +125,9 @@ endif @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ +ifeq "$(GhcUnregisterised)" "YES" + @echo "#define UnregisterisedCompiler 1" >> $@ +endif @echo >> $@ @echo "#endif /* __GHCPLATFORM_H__ */" >> $@ @echo "Done." diff --git a/includes/stg/RtsMachRegs.h b/includes/stg/RtsMachRegs.h index f78cb1f6b7..1eae6a5883 100644 --- a/includes/stg/RtsMachRegs.h +++ b/includes/stg/RtsMachRegs.h @@ -15,6 +15,12 @@ #ifndef RTSMACHREGS_H #define RTSMACHREGS_H +#ifdef UnregisterisedCompiler +#ifndef NO_REGS +#define NO_REGS +#endif +#endif + /* * Defining NO_REGS causes no global registers to be used. NO_REGS is * typically defined by GHC, via a command-line option passed to gcc, |
