diff options
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r-- | compiler/ghc.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 1149fbdf1e..caf491e4c1 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -309,6 +309,12 @@ compiler_stage1_CONFIGURE_OPTS += --flags=stage1 compiler_stage2_CONFIGURE_OPTS += --flags=stage2 compiler_stage3_CONFIGURE_OPTS += --flags=stage3 +ifeq "$(GhcThreaded)" "YES" +# We pass THREADED_RTS to the stage2 C files so that cbits/genSym.c will bring +# the threaded version of atomic_inc() into scope. +compiler_stage2_CONFIGURE_OPTS += --ghc-option=-optc-DTHREADED_RTS +endif + ifeq "$(GhcWithNativeCodeGen)" "YES" compiler_stage1_CONFIGURE_OPTS += --flags=ncg compiler_stage2_CONFIGURE_OPTS += --flags=ncg |