Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3a0a3151e1194f2330b2ea52c659bb020d75a78c

>---------------------------------------------------------------

commit 3a0a3151e1194f2330b2ea52c659bb020d75a78c
Author: Ian Lynagh <i...@well-typed.com>
Date:   Sat Oct 27 13:37:45 2012 +0100

    Fix build on platforms on which we don't have register info

>---------------------------------------------------------------

 includes/ghc.mk            |    5 ++++-
 includes/stg/RtsMachRegs.h |    6 ++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/includes/ghc.mk b/includes/ghc.mk
index dd38a6d..85df1da 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 f78cb1f..1eae6a5 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,



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to