[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#890763: ghc: Please include upstream patch to reduce optimization level for unregistered builds



Source: ghc
Version: 8.0.2-11
Severity: normal
Tags: patch
User: debian-68k@lists.debian.org
Usertags: m68k

Hi!

>From time to time, GHC causes various issues when building the unregistered
compiler with -O2 optimization levels. The problems range from miscompiled
code on m68k and sh4 to the assembler crashing on ia64 due to the generated
code.

In order to fix this, upstream contains a change with which reduces the
optimization level for unregistered builds to -O1 [1]. I'm attaching
a backported version of the patch.

Please consider including it in the next upload.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Description: mk/config.mk.in: lower -O2 optimization down to -O1 on UNREG
Author: Sergei Trofimovich <slyfox@gentoo.org>
Origin: upstream, http://git.haskell.org/ghc.git/commitdiff/432a1f18327a50d7b2bbdbe6b004473fe1b0b0b9
Last-Update: 2018-02-17

--- ghc-8.0.2.orig/mk/config.mk.in
+++ ghc-8.0.2/mk/config.mk.in
@@ -70,15 +70,6 @@ GhcStage1HcOpts=
 GhcStage2HcOpts=-O2
 GhcStage3HcOpts=-O2
 
-# Disable -O2 optimization. Otherwise amount of generated C code
-# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
-# and sometimes not compile at all (powerpc64 overflows something
-# on 'compiler/hsSyn/HsExpr.lhs').
-ifeq "$(GhcUnregisterised)" "YES"
-GhcStage1HcOpts=
-GhcStage2HcOpts=
-GhcStage3HcOpts=
-endif
 
 # Note [Stage number in build variables].
 #
@@ -892,3 +883,15 @@ GMP_LIB_DIRS = @GMP_LIB_DIRS@
 
 CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
 CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
+
+# Disable -O2 optimization. Otherwise amount of generated C code
+# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
+# and sometimes not compile at all (powerpc64 overflows something
+# on 'compiler/hsSyn/HsExpr.lhs').
+ifeq "$(GhcUnregisterised)" "YES"
+GhcStage1HcOpts=
+GhcStage2HcOpts=
+GhcStage3HcOpts=
+
+GhcLibHcOpts=
+endif

Reply to: