[commit: ghc] master: Simplify -fcmm-sink handling for Parser.hs (37945c1)

git at git.haskell.org git at git.haskell.org
Thu Dec 31 21:42:06 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/37945c1db2f893657c1e3b9b26704cbf3ef27a5a/ghc

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

commit 37945c1db2f893657c1e3b9b26704cbf3ef27a5a
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Dec 31 21:33:46 2015 +0100

    Simplify -fcmm-sink handling for Parser.hs
    
    As we're requiring GHC >= 7.10 now, the conditional handling introduced
    in 9e133b9dccec0553c6ec302d6ca0d3bc5eea06c4 for addressing #8182 can be
    made unconditional, and thus simplify the build-system a little bit.


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

37945c1db2f893657c1e3b9b26704cbf3ef27a5a
 compiler/ghc.mk | 9 ++-------
 configure.ac    | 6 ------
 mk/config.mk.in | 2 --
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 49c6971..f9ca71c 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -370,17 +370,12 @@ endif
 # at it, because that takes too long and doesn't buy much, but we do want
 # to inline certain key external functions, so we instruct GHC not to
 # throw away inlinings as it would normally do in -O0 mode.
-compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
-# 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
+# Since GHC version 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.
 # See #8182 for all the details
-ifeq "$(CMM_SINK_BOOTSTRAP_IS_NEEDED)" "YES"
-compiler/stage1/build/Parser_HC_OPTS += -fcmm-sink
-endif
-# We also pass -fcmm-sink to every stage != 1
+compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas -fcmm-sink
 compiler/stage2/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas -fcmm-sink
 compiler/stage3/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas -fcmm-sink
 
diff --git a/configure.ac b/configure.ac
index ae8a3e9..042b417 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,12 +153,6 @@ fi
 GHC_PACKAGE_DB_FLAG=package-db
 AC_SUBST(GHC_PACKAGE_DB_FLAG)
 
-# GHC 7.7+ needs -fcmm-sink when compiling Parser.hs. See #8182
-FP_COMPARE_VERSIONS([$GhcVersion],[-gt],[7.7],
-                    CMM_SINK_BOOTSTRAP_IS_NEEDED=YES,
-                    CMM_SINK_BOOTSTRAP_IS_NEEDED=NO)
-AC_SUBST(CMM_SINK_BOOTSTRAP_IS_NEEDED)
-
 # GHC is passed to Cabal, so we need a native path
 if test "${WithGhc}" != ""
 then
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 4331b36..2091671 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -498,8 +498,6 @@ endif
 
 GHC_PACKAGE_DB_FLAG = @GHC_PACKAGE_DB_FLAG@
 
-CMM_SINK_BOOTSTRAP_IS_NEEDED = @CMM_SINK_BOOTSTRAP_IS_NEEDED@
-
 #-----------------------------------------------------------------------------
 # C compiler
 #



More information about the ghc-commits mailing list