[commit: ghc] master: \#undef REG_R[1-10] as a precaution (c78804d)

Simon Marlow marlowsd at gmail.com
Wed Jan 30 21:26:07 CET 2013


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c78804dbdf738b9294535968c64c981fdae037c6

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

commit c78804dbdf738b9294535968c64c981fdae037c6
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Jan 30 19:38:33 2013 +0000

    \#undef REG_R[1-10] as a precaution

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

 includes/stg/MachRegs.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index 8cefe9b..6dc81f6 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -20,6 +20,21 @@
  */
 
 /*
+ * Undefine these as a precaution: some of them were found to be
+ * defined by system headers on ARM/Linux.
+ */
+#undef REG_R1
+#undef REG_R2
+#undef REG_R3
+#undef REG_R4
+#undef REG_R5
+#undef REG_R6
+#undef REG_R7
+#undef REG_R8
+#undef REG_R9
+#undef REG_R10
+
+/*
  * Defining MACHREGS_NO_REGS to 1 causes no global registers to be used.
  * MACHREGS_NO_REGS is typically controlled by NO_REGS, which is
  * typically defined by GHC, via a command-line option passed to gcc,





More information about the ghc-commits mailing list