diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-09-06 11:08:38 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2013-09-06 11:08:38 -0400 |
commit | 67d1d4edd5943f4425578a87e6f0940a442b3892 (patch) | |
tree | bb83a454f677b372c4f82502d2ff5edf92f34d65 /compiler/ghc.mk | |
parent | 1f5338e7b71f56c6d2451b9b23608c851bf90c8a (diff) | |
parent | df614779c356ea6aef29367a8dd1ca819b03a1d1 (diff) | |
download | haskell-67d1d4edd5943f4425578a87e6f0940a442b3892.tar.gz |
Merge remote-tracking branch 'origin/master' into ghc-parmake-gsoc
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r-- | compiler/ghc.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index af289d436c..caf491e4c1 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -347,8 +347,23 @@ else compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS endif -ifeq "$(GhcProfiled)" "YES" +# If we're bootstrapping the compiler during stage2, or we're being +# built by a GHC whose version is > 7.8, we need -fcmm-sink to be +# passed to the compiler. This is required on x86 to avoid the +# register allocator running out of stack slots when compiling this +# module with -fPIC -dynamic. +ifeq "$(CMM_SINK_BOOTSTRAP_IS_NEEDED)" "YES" +compiler/stage1/build/Parser_HC_OPTS += -fcmm-sink +endif +# However, we may be using e.g. 7.6, and thus the bootstrap compiler +# does not need to pass -fcmm-sink, but stage1+ does! +# We pass -fcmm-sink to every stage != 1 +# See #8182 for all the details +compiler/stage2/build/Parser_HC_OPTS += -fcmm-sink +compiler/stage3/build/Parser_HC_OPTS += -fcmm-sink + +ifeq "$(GhcProfiled)" "YES" # If we're profiling GHC then we want SCCs. However, adding -auto-all # everywhere tends to give a hard-to-read profile, and adds lots of # overhead. A better approach is to proceed top-down; identify the |