summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y.pp
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-08-31 10:46:08 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-08-31 16:43:59 +0100
commit111edd855e8d875d838e26b57a8bc89ecccbd7db (patch)
tree3d728963865832e72a122ad56bcc184c7a1cfa2d /compiler/parser/Parser.y.pp
parentfad7453b64fd1783e688efaa534ffdc2fe6f1324 (diff)
downloadhaskell-111edd855e8d875d838e26b57a8bc89ecccbd7db.tar.gz
Add -fcmm-sink to avoid the register allocator failing on x86
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r--compiler/parser/Parser.y.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 410f95bebf..ac6a73784b 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -24,6 +24,16 @@ to inline certain key external functions, so we instruct GHC not to
throw away inlinings as it would normally do in -O0 mode.
-}
+-- CPP tricks because we want the directives in the output of the
+-- first CPP pass.
+#define __IF_GHC_77__ #if __GLASGOW_HASKELL__ >= 707
+#define __ENDIF__ #endif
+__IF_GHC_77__
+-- Required on x86 to avoid the register allocator running out of
+-- stack slots when compiling this module with -fPIC -dynamic.
+{-# OPTIONS_GHC -fcmm-sink #-}
+__ENDIF__
+
module Parser ( parseModule, parseStmt, parseIdentifier, parseType,
parseHeader ) where