[DHG_packages] 01/34: ghc: New upstream release (v8.0.2)

Ilias Tsitsimpis iliastsi-guest at moszumanska.debian.org
Fri Jan 27 09:46:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

iliastsi-guest pushed a commit to branch ghc-8.0.2
in repository DHG_packages.

commit f71f97284eeb030637b9745a17d1f144f1216745
Author: Ilias Tsitsimpis <i.tsitsimpis at gmail.com>
Date:   Fri Jan 20 16:47:13 2017 +0200

    ghc: New upstream release (v8.0.2)
---
 p/ghc/debian/changelog                             |   6 +
 p/ghc/debian/patches/ARM-VFPv3D16                  |   8 +-
 p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX        |  45 ----
 p/ghc/debian/patches/add-missing-MO_WriteBarrier   |  38 ----
 p/ghc/debian/patches/buildpath-abi-stability.patch |  10 +-
 .../compiler-cmm-PprC-sparc-alignment.patch        |   2 +
 p/ghc/debian/patches/do-not-use-SHELL              |  30 +--
 p/ghc/debian/patches/find-tycon-panic              |  40 ----
 p/ghc/debian/patches/fix-ppc-lwa-generation        |  64 ------
 p/ghc/debian/patches/get-linker-flags-correctly    |  43 ----
 p/ghc/debian/patches/hurd.diff                     |  20 +-
 .../debian/patches/no-missing-haddock-file-warning |  10 +-
 p/ghc/debian/patches/no-pie                        | 230 ---------------------
 p/ghc/debian/patches/osdecommitmemory-compat.patch |   4 +-
 p/ghc/debian/patches/reproducible-tmp-names        |  12 +-
 p/ghc/debian/patches/series                        |   7 -
 p/ghc/debian/patches/smp-arm-fix.patch             |  11 -
 p/ghc/debian/patches/use-debian-gen_contents_index |  12 +-
 .../patches/x32-use-native-x86_64-insn.patch       |   8 +-
 19 files changed, 67 insertions(+), 533 deletions(-)

diff --git a/p/ghc/debian/changelog b/p/ghc/debian/changelog
index c4265d5..37eebe8 100644
--- a/p/ghc/debian/changelog
+++ b/p/ghc/debian/changelog
@@ -1,3 +1,9 @@
+ghc (8.0.2-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Thu, 19 Jan 2017 08:39:38 +0100
+
 ghc (8.0.1-17) unstable; urgency=medium
 
   * Add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX".
diff --git a/p/ghc/debian/patches/ARM-VFPv3D16 b/p/ghc/debian/patches/ARM-VFPv3D16
index 379b74c..2a005a0 100644
--- a/p/ghc/debian/patches/ARM-VFPv3D16
+++ b/p/ghc/debian/patches/ARM-VFPv3D16
@@ -6,11 +6,11 @@ Author: Jani Monoses <jani at ubuntu.com>
 Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
 Launchpad-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
 
-Index: ghc/aclocal.m4
+Index: b/aclocal.m4
 ===================================================================
---- ghc.orig/aclocal.m4	2016-01-14 16:19:24.858462215 +0100
-+++ ghc/aclocal.m4	2016-01-14 16:19:24.854462134 +0100
-@@ -420,7 +420,7 @@
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -420,7 +420,7 @@ AC_DEFUN([GET_ARM_ISA],
                  )],
                  [changequote(, )dnl
                   ARM_ISA=ARMv7
diff --git a/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX b/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX
deleted file mode 100644
index a0f1dd1..0000000
--- a/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0d963caf40da4391028a3beb95b5082c87985e7d Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar at zhox.com>
-Date: Sun, 5 Jun 2016 09:59:05 +0200
-Subject: [PATCH] Add relocation type R_X86_64_REX_GOTPCRELX
-
-Summary:
-Adding support for the `R_X86_64_REX_GOTPCRELX` relocation type.
-This relocation is treated by the linker the same as the `R_X86_64_GOTPCRELX` type
-`G + GOT + A - P` to generate relative offsets to the GOT.
-The `REX` prefix has no influence in this stage.
-
-This is based on https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r252.pdf
-
-Test Plan: ./validate
-
-Reviewers: erikd, austin, bgamari, simonmar
-
-Reviewed By: erikd
-
-Subscribers: thomie, #ghc_windows_task_force
-
-Differential Revision: https://phabricator.haskell.org/D2303
-
-GHC Trac Issues: #12147
----
- rts/Linker.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -5855,7 +5855,13 @@
-           *(Elf64_Sword *)P = (Elf64_Sword)value;
- #endif
-           break;
--
-+/* These two relocations were introduced in glibc 2.23 and binutils 2.26.
-+    But in order to use them the system which compiles the bindist for GHC needs
-+    to have glibc >= 2.23. So only use them if they're defined. */
-+#if defined(R_X86_64_REX_GOTPCRELX) && defined(R_X86_64_GOTPCRELX)
-+      case R_X86_64_REX_GOTPCRELX:
-+      case R_X86_64_GOTPCRELX:
-+#endif
-       case R_X86_64_GOTPCREL:
-       {
-           StgInt64 gotAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S)->addr;
diff --git a/p/ghc/debian/patches/add-missing-MO_WriteBarrier b/p/ghc/debian/patches/add-missing-MO_WriteBarrier
deleted file mode 100644
index 0d5ab74..0000000
--- a/p/ghc/debian/patches/add-missing-MO_WriteBarrier
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Ben Gamari <bgamari.foss at gmail.com>
-Date: Tue, 30 Aug 2016 21:08:05 +0000 (-0400)
-Subject: StgCmmPrim: Add missing MO_WriteBarrier
-X-Git-Url: https://git.haskell.org/ghc.git/commitdiff_plain/7053019e7b04842dd7364039381d8c4c069489a2
-
-StgCmmPrim: Add missing MO_WriteBarrier
-
-Test Plan: Good question
-
-Reviewers: austin, trommler, simonmar, rrnewton
-
-Reviewed By: simonmar
-
-Subscribers: RyanGlScott, thomie
-
-Differential Revision: https://phabricator.haskell.org/D2495
-
-GHC Trac Issues: #12469
-
-(cherry picked from commit d40d6df74a9fca382a84709ac9bc862897fbec18)
----
-
---- a/compiler/codeGen/StgCmmPrim.hs
-+++ b/compiler/codeGen/StgCmmPrim.hs
-@@ -310,8 +310,11 @@
- emitPrimOp dflags [res] ReadMutVarOp [mutv]
-    = emitAssign (CmmLocal res) (cmmLoadIndexW dflags mutv (fixedHdrSizeW dflags) (gcWord dflags))
- 
--emitPrimOp dflags [] WriteMutVarOp [mutv,var]
--   = do emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var
-+emitPrimOp dflags res@[] WriteMutVarOp [mutv,var]
-+   = do -- Without this write barrier, other CPUs may see this pointer before
-+        -- the writes for the closure it points to have occurred.
-+        emitPrimCall res MO_WriteBarrier []
-+        emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var
-         emitCCall
-                 [{-no results-}]
-                 (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))
diff --git a/p/ghc/debian/patches/buildpath-abi-stability.patch b/p/ghc/debian/patches/buildpath-abi-stability.patch
index 8add0fc..50248b8 100644
--- a/p/ghc/debian/patches/buildpath-abi-stability.patch
+++ b/p/ghc/debian/patches/buildpath-abi-stability.patch
@@ -1,10 +1,10 @@
 Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
 
-Index: ghc/compiler/iface/MkIface.hs
+Index: b/compiler/iface/MkIface.hs
 ===================================================================
---- ghc.orig/compiler/iface/MkIface.hs	2016-04-19 09:26:40.075170754 +0200
-+++ ghc/compiler/iface/MkIface.hs	2016-04-19 09:26:40.071170684 +0200
-@@ -556,7 +556,7 @@
+--- a/compiler/iface/MkIface.hs
++++ b/compiler/iface/MkIface.hs
+@@ -556,7 +556,7 @@ addFingerprints hsc_env mb_old_fingerpri
     iface_hash <- computeFingerprint putNameLiterally
                        (mod_hash,
                         ann_fn (mkVarOcc "module"),  -- See mkIfaceAnnCache
@@ -13,7 +13,7 @@ Index: ghc/compiler/iface/MkIface.hs
                         sorted_deps,
                         mi_hpc iface0)
  
-@@ -589,6 +589,9 @@
+@@ -589,6 +589,9 @@ addFingerprints hsc_env mb_old_fingerpri
      (non_orph_fis,   orph_fis)   = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
      fix_fn = mi_fix_fn iface0
      ann_fn = mkIfaceAnnCache (mi_anns iface0)
diff --git a/p/ghc/debian/patches/compiler-cmm-PprC-sparc-alignment.patch b/p/ghc/debian/patches/compiler-cmm-PprC-sparc-alignment.patch
index 9f65bd7..3d6eec3 100644
--- a/p/ghc/debian/patches/compiler-cmm-PprC-sparc-alignment.patch
+++ b/p/ghc/debian/patches/compiler-cmm-PprC-sparc-alignment.patch
@@ -1,3 +1,5 @@
+Index: b/compiler/cmm/PprC.hs
+===================================================================
 --- a/compiler/cmm/PprC.hs
 +++ b/compiler/cmm/PprC.hs
 @@ -1114,6 +1114,8 @@ cLoad expr rep
diff --git a/p/ghc/debian/patches/do-not-use-SHELL b/p/ghc/debian/patches/do-not-use-SHELL
index 540efa9..33d7a0b 100644
--- a/p/ghc/debian/patches/do-not-use-SHELL
+++ b/p/ghc/debian/patches/do-not-use-SHELL
@@ -3,11 +3,11 @@ Description: Do not use $SHELL
  leak into the wrapper scripts.
 Author: Joachim Breitner <nomeata at debian.org>
 
-Index: ghc/driver/ghci/ghc.mk
+Index: b/driver/ghci/ghc.mk
 ===================================================================
---- ghc.orig/driver/ghci/ghc.mk	2016-07-07 12:40:40.690866042 +0200
-+++ ghc/driver/ghci/ghc.mk	2016-07-07 12:40:40.686863966 +0200
-@@ -21,7 +21,7 @@
+--- a/driver/ghci/ghc.mk
++++ b/driver/ghci/ghc.mk
+@@ -21,7 +21,7 @@ install_driver_ghci:
  	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
  	$(call removeFiles,                                "$(WRAPPER)")
  	$(CREATE_SCRIPT)                                   "$(WRAPPER)"
@@ -16,7 +16,7 @@ Index: ghc/driver/ghci/ghc.mk
  	echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
  	$(EXECUTABLE_FILE)                                 "$(WRAPPER)"
  	$(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
-@@ -56,7 +56,7 @@
+@@ -56,7 +56,7 @@ install_driver_ghcii: GHCII_SCRIPT_VERSI
  install_driver_ghcii:
  	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
  	$(call removeFiles,"$(GHCII_SCRIPT)")
@@ -25,11 +25,11 @@ Index: ghc/driver/ghci/ghc.mk
  	echo 'exec "$$(dirname "$$0")"/ghc --interactive "$$@"' >> $(GHCII_SCRIPT)
  	$(EXECUTABLE_FILE) $(GHCII_SCRIPT)
  	cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
-Index: ghc/rules/shell-wrapper.mk
+Index: b/rules/shell-wrapper.mk
 ===================================================================
---- ghc.orig/rules/shell-wrapper.mk	2016-07-07 12:40:40.690866042 +0200
-+++ ghc/rules/shell-wrapper.mk	2016-07-07 12:40:40.686863966 +0200
-@@ -41,7 +41,7 @@
+--- a/rules/shell-wrapper.mk
++++ b/rules/shell-wrapper.mk
+@@ -41,7 +41,7 @@ $$($1_$2_INPLACE_WRAPPER): $$($1_$2_SHEL
  endif
  $$($1_$2_INPLACE_WRAPPER): $$($1_$2_INPLACE)
  	$$(call removeFiles,                                                    $$@)
@@ -38,7 +38,7 @@ Index: ghc/rules/shell-wrapper.mk
  	echo 'executablename="$$(TOP)/$$<"'                                  >> $$@
  	echo 'datadir="$$(TOP)/$$(INPLACE_LIB)"'                             >> $$@
  	echo 'bindir="$$(TOP)/$$(INPLACE_BIN)"'                              >> $$@
-@@ -80,7 +80,7 @@
+@@ -80,7 +80,7 @@ install_$1_$2_wrapper:
  	$$(INSTALL_DIR) "$$(DESTDIR)$$(bindir)"
  	$$(call removeFiles,                                        "$$(WRAPPER)")
  	$$(CREATE_SCRIPT)                                           "$$(WRAPPER)"
@@ -47,7 +47,7 @@ Index: ghc/rules/shell-wrapper.mk
  	echo 'exedir="$$(ghclibexecdir)/bin"'                    >> "$$(WRAPPER)"
  	echo 'exeprog="$$($1_$2_PROG)"'                          >> "$$(WRAPPER)"
  	echo 'executablename="$$$$exedir/$$$$exeprog"'           >> "$$(WRAPPER)"
-@@ -106,7 +106,7 @@
+@@ -106,7 +106,7 @@ BINDIST_EXTRAS += $$($1_$2_BINDIST_WRAPP
  
  $$($1_$2_BINDIST_WRAPPER): $1/$2/build/tmp/$$($1_$2_PROG)
  	$$(call removeFiles,                                                  $$@)
@@ -56,11 +56,11 @@ Index: ghc/rules/shell-wrapper.mk
  ifeq "$$(DYNAMIC_GHC_PROGRAMS)" "YES"
  	echo '$$(call prependLibraryPath,$$($1_$2_DEP_LIB_REL_DIRS_SEARCHPATH))' >> $$@
  endif
-Index: ghc/utils/mkdirhier/ghc.mk
+Index: b/utils/mkdirhier/ghc.mk
 ===================================================================
---- ghc.orig/utils/mkdirhier/ghc.mk	2016-07-07 12:40:40.690866042 +0200
-+++ ghc/utils/mkdirhier/ghc.mk	2016-07-07 12:40:40.686863966 +0200
-@@ -14,7 +14,7 @@
+--- a/utils/mkdirhier/ghc.mk
++++ b/utils/mkdirhier/ghc.mk
+@@ -14,7 +14,7 @@ $(MKDIRHIER) : utils/mkdirhier/mkdirhier
  	mkdir -p $(INPLACE_BIN)
  	mkdir -p $(INPLACE_LIB)
  	$(call removeFiles,$@)
diff --git a/p/ghc/debian/patches/find-tycon-panic b/p/ghc/debian/patches/find-tycon-panic
deleted file mode 100644
index 968dbc3..0000000
--- a/p/ghc/debian/patches/find-tycon-panic
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Adam Gundry <adam at well-typed.com>
-Subject: Avoid find_tycon panic if datacon is not in scope
-
-When using TH to splice expressions involving record field construction,
-the parent datacon may not be in scope.  We shouldn't panic about this,
-because we will be renaming Exact RdrNames which don't require any
-disambiguation.
-
-Reviewers: austin, bgamari
-Reviewed By: bgamari
-Differential Revision: https://phabricator.haskell.org/D2321
-GHC Trac Issues: #12130
-
-Origin: upstream, https://git.haskell.org/ghc.git/commitdiff/694e0f3a08030
-
-Index: b/compiler/rename/RnPat.hs
-===================================================================
---- a/compiler/rename/RnPat.hs
-+++ b/compiler/rename/RnPat.hs
-@@ -636,7 +636,7 @@ rnHsRecFields ctxt mk_arg (HsRecFields {
-     find_tycon :: GlobalRdrEnv -> Name {- DataCon -} -> Maybe Name {- TyCon -}
-     -- Return the parent *type constructor* of the data constructor
-     -- (that is, the parent of the data constructor),
--    -- or 'Nothing' if it is a pattern synonym.
-+    -- or 'Nothing' if it is a pattern synonym or not in scope.
-     -- That's the parent to use for looking up record fields.
-     find_tycon env con
-       | Just (AConLike (RealDataCon dc)) <- wiredInNameTyThing_maybe con
-@@ -648,8 +648,9 @@ rnHsRecFields ctxt mk_arg (HsRecFields {
-           ParentIs p -> Just p
-           _          -> Nothing
- 
--      | otherwise
--      = pprPanic "find_tycon" (ppr con $$ ppr (lookupGRE_Name env con))
-+      | otherwise = Nothing
-+        -- This can happen if the datacon is not in scope
-+        -- and we are in a TH splice (Trac #12130)
- 
-     dup_flds :: [[RdrName]]
-         -- Each list represents a RdrName that occurred more than once
diff --git a/p/ghc/debian/patches/fix-ppc-lwa-generation b/p/ghc/debian/patches/fix-ppc-lwa-generation
deleted file mode 100644
index 678004f..0000000
--- a/p/ghc/debian/patches/fix-ppc-lwa-generation
+++ /dev/null
@@ -1,64 +0,0 @@
-From ce3370e06165690e79a8eb22e5229b515157e00f Mon Sep 17 00:00:00 2001
-From: Peter Trommler <ptrommler at acm.org>
-Date: Sat, 1 Oct 2016 17:56:31 -0400
-Subject: [PATCH] PPC/CodeGen: fix lwa instruction generation
-
-Opcode lwa is a 64-bit opcode and allows a DS-form only.  This patch
-generates lwa opcodes only when the offset is a multiple of 4.
-
-Fixes #12621
-
-Test Plan: validate
-
-Reviewers: erikd, hvr, simonmar, austin, bgamari
-
-Reviewed By: bgamari
-
-Subscribers: thomie
-
-Differential Revision: https://phabricator.haskell.org/D2547
-
-GHC Trac Issues: #12621
----
- compiler/nativeGen/PPC/CodeGen.hs | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
---- a/compiler/nativeGen/PPC/CodeGen.hs
-+++ b/compiler/nativeGen/PPC/CodeGen.hs
-@@ -9,9 +9,8 @@
- -----------------------------------------------------------------------------
- 
- -- This is a big module, but, if you pay attention to
---- (a) the sectioning, (b) the type signatures, and
---- (c) the #if blah_TARGET_ARCH} things, the
---- structure should not be too overwhelming.
-+-- (a) the sectioning, and (b) the type signatures,
-+-- the structure should not be too overwhelming.
- 
- module PPC.CodeGen (
-         cmmTopCodeGen,
-@@ -471,7 +470,8 @@
-     return (Any II64 (\dst -> addr_code `snocOL` LD II32 dst addr))
- 
- getRegister' _ (CmmMachOp (MO_SS_Conv W32 W64) [CmmLoad mem _]) = do
--    Amode addr addr_code <- getAmode D mem
-+    -- lwa is DS-form. See Note [Power instruction format]
-+    Amode addr addr_code <- getAmode DS mem
-     return (Any II64 (\dst -> addr_code `snocOL` LA II32 dst addr))
- 
- getRegister' dflags (CmmMachOp mop [x]) -- unary MachOps
-@@ -733,6 +733,14 @@
-     ... (tmp) ...
- -}
- 
-+{- Note [Power instruction format]
-+In some instructions the 16 bit offset must be a multiple of 4, i.e.
-+the two least significant bits mus be zero. The "Power ISA" specification
-+calls these instruction formats "DS-FORM" and the instructions with
-+arbitrary 16 bit offsets are "D-FORM".
-+
-+The Power ISA specification document can be obtained from www.power.org.
-+-}
- data InstrForm = D | DS
- 
- getAmode :: InstrForm -> CmmExpr -> NatM Amode
diff --git a/p/ghc/debian/patches/get-linker-flags-correctly b/p/ghc/debian/patches/get-linker-flags-correctly
deleted file mode 100644
index 4c33bd9..0000000
--- a/p/ghc/debian/patches/get-linker-flags-correctly
+++ /dev/null
@@ -1,43 +0,0 @@
-From c30b179a73d9fd3f6edcdda5e881523cd6edd46a Mon Sep 17 00:00:00 2001
-From: Anders Kaseorg <andersk at mit.edu>
-Date: Thu, 19 May 2016 03:18:02 -0400
-Subject: [PATCH] =?utf8?q?Get=20linker=20flags=20correctly=20from=20GHC=20?=
- =?utf8?q?=E2=89=A5=207.8?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-GHC 7.8 renamed "Gcc Linker flags" to "C compiler link flags" and "Ld
-Linker flags" to "ld flags"
-(https://ghc.haskell.org/trac/ghc/ticket/4862).
-
-Without this corresponding fix in Cabal, the old-time package fails to
-compile on Ubuntu yakkety amd64, where the system GCC now defaults to
--pie and GHC has
-
-    $ ghc --info | grep -i pie
-     ,("C compiler flags","-fno-PIE -fno-stack-protector")
-     ,("C compiler link flags","-no-pie")
-     ,("ld flags","-no-pie")
-
-Signed-off-by: Anders Kaseorg <andersk at mit.edu>
-(cherry picked from commit c993a0c6660aa10d8c79ed0cc4961c59acfc91c8)
----
- libraries/Cabal/Cabal/Distribution/Simple/GHC/Internal.hs | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
---- a/libraries/Cabal/Cabal/Distribution/Simple/GHC/Internal.hs
-+++ b/libraries/Cabal/Cabal/Distribution/Simple/GHC/Internal.hs
-@@ -139,8 +139,10 @@
-     mbStripLocation = M.lookup "strip command" ghcInfo
- 
-     ccFlags        = getFlags "C compiler flags"
--    gccLinkerFlags = getFlags "Gcc Linker flags"
--    ldLinkerFlags  = getFlags "Ld Linker flags"
-+    -- GHC 7.8 renamed "Gcc Linker flags" to "C compiler link flags"
-+    -- and "Ld Linker flags" to "ld flags" (GHC #4862).
-+    gccLinkerFlags = getFlags "Gcc Linker flags" ++ getFlags "C compiler link flags"
-+    ldLinkerFlags  = getFlags "Ld Linker flags" ++ getFlags "ld flags"
- 
-     -- It appears that GHC 7.6 and earlier encode the tokenized flags as a
-     -- [String] in these settings whereas later versions just encode the flags as
diff --git a/p/ghc/debian/patches/hurd.diff b/p/ghc/debian/patches/hurd.diff
index 8602124..87c1139 100644
--- a/p/ghc/debian/patches/hurd.diff
+++ b/p/ghc/debian/patches/hurd.diff
@@ -1,10 +1,10 @@
 Provided by “Pino” via Samuel Thibault. Not yet pushed upstream.
 
-Index: ghc/aclocal.m4
+Index: b/aclocal.m4
 ===================================================================
---- ghc.orig/aclocal.m4	2016-01-14 16:20:19.683572714 +0100
-+++ ghc/aclocal.m4	2016-01-14 16:21:18.024754631 +0100
-@@ -277,7 +277,7 @@
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -277,7 +277,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
          nto-qnx)
              test -z "[$]2" || eval "[$]2=OSQNXNTO"
              ;;
@@ -13,7 +13,7 @@ Index: ghc/aclocal.m4
              test -z "[$]2" || eval "[$]2=OSUnknown"
              ;;
          aix)
-@@ -286,6 +286,9 @@
+@@ -286,6 +286,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
          linux-android)
              test -z "[$]2" || eval "[$]2=OSAndroid"
              ;;
@@ -23,11 +23,11 @@ Index: ghc/aclocal.m4
          *)
              echo "Unknown OS '[$]1'"
              exit 1
-Index: ghc/compiler/utils/Platform.hs
+Index: b/compiler/utils/Platform.hs
 ===================================================================
---- ghc.orig/compiler/utils/Platform.hs	2016-01-14 16:20:19.683572714 +0100
-+++ ghc/compiler/utils/Platform.hs	2016-01-14 16:20:40.067985654 +0100
-@@ -88,6 +88,7 @@
+--- a/compiler/utils/Platform.hs
++++ b/compiler/utils/Platform.hs
+@@ -88,6 +88,7 @@ data OS
          | OSQNXNTO
          | OSAndroid
          | OSAIX
@@ -35,7 +35,7 @@ Index: ghc/compiler/utils/Platform.hs
          deriving (Read, Show, Eq)
  
  -- | ARM Instruction Set Architecture, Extensions and ABI
-@@ -141,6 +142,7 @@
+@@ -141,6 +142,7 @@ osElfTarget OSOsf3      = False -- I don
  osElfTarget OSQNXNTO    = False
  osElfTarget OSAndroid   = True
  osElfTarget OSAIX       = False
diff --git a/p/ghc/debian/patches/no-missing-haddock-file-warning b/p/ghc/debian/patches/no-missing-haddock-file-warning
index 363525a..6a064a3 100644
--- a/p/ghc/debian/patches/no-missing-haddock-file-warning
+++ b/p/ghc/debian/patches/no-missing-haddock-file-warning
@@ -3,12 +3,12 @@ Description: Do not emit a warning if the .haddock file is missing
  without the -doc package.
 Author: Joachim Breitner <nomeata at debian.org>
 
-Index: ghc/utils/ghc-pkg/Main.hs
+Index: b/utils/ghc-pkg/Main.hs
 ===================================================================
---- ghc.orig/utils/ghc-pkg/Main.hs	2016-02-08 11:31:08.897241576 +0100
-+++ ghc/utils/ghc-pkg/Main.hs	2016-02-08 11:31:08.893241486 +0100
-@@ -1585,8 +1585,10 @@
-   mapM_ (checkDir True  "library-dirs") (libraryDirs pkg)
+--- a/utils/ghc-pkg/Main.hs
++++ b/utils/ghc-pkg/Main.hs
+@@ -1588,8 +1588,10 @@ checkPackageConfig pkg verbosity db_stac
+   mapM_ (checkDir True  "dynamic-library-dirs") (libraryDynDirs pkg)
    mapM_ (checkDir True  "include-dirs") (includeDirs pkg)
    mapM_ (checkDir True  "framework-dirs") (frameworkDirs pkg)
 -  mapM_ (checkFile   True "haddock-interfaces") (haddockInterfaces pkg)
diff --git a/p/ghc/debian/patches/no-pie b/p/ghc/debian/patches/no-pie
deleted file mode 100644
index 47fdde5..0000000
--- a/p/ghc/debian/patches/no-pie
+++ /dev/null
@@ -1,230 +0,0 @@
-Description: Pass -no-pie to GCC
- Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
- default in their GCC packaging. This breaks our abuse of GCC as a linker
- which requires that we pass -Wl,-r, which is incompatible with
- PIE (since the former implies that we are generating a relocatable
- object file and the latter an executable).
-Author: Ben Gamari <bgamari.foss at gmail.com>
-Origin: upstream, https://phabricator.haskell.org/D2693
-Bug: https://ghc.haskell.org/trac/ghc/ticket/12759
-Bug-Debian: https://bugs.debian.org/712228
-
-Index: b/aclocal.m4
-===================================================================
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -502,12 +502,14 @@ AC_DEFUN([FP_SETTINGS],
-     fi
-     SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
-     SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
-+    SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE"
-     SettingsLdFlags="$CONF_LD_LINKER_OPTS_STAGE2"
-     AC_SUBST(SettingsCCompilerCommand)
-     AC_SUBST(SettingsHaskellCPPCommand)
-     AC_SUBST(SettingsHaskellCPPFlags)
-     AC_SUBST(SettingsCCompilerFlags)
-     AC_SUBST(SettingsCCompilerLinkFlags)
-+    AC_SUBST(SettingsCCompilerSupportsNoPie)
-     AC_SUBST(SettingsLdCommand)
-     AC_SUBST(SettingsLdFlags)
-     AC_SUBST(SettingsArCommand)
-@@ -1254,6 +1256,25 @@ AC_SUBST(GccIsClang)
- rm -f conftest.txt
- ])
- 
-+# FP_GCC_SUPPORTS_NO_PIE
-+# ----------------------
-+# Does gcc support the -no-pie option? If so we should pass it to gcc when
-+# joining objects since -pie may be enabled by default.
-+AC_DEFUN([FP_GCC_SUPPORTS_NO_PIE],
-+[
-+   AC_REQUIRE([AC_PROG_CC])
-+   AC_MSG_CHECKING([whether GCC supports -no-pie])
-+   echo 'int main() { return 0; }' > conftest.c
-+   if ${CC-cc} -o conftest -no-pie conftest.c > /dev/null 2>&1; then
-+       CONF_GCC_SUPPORTS_NO_PIE=YES
-+       AC_MSG_RESULT([yes])
-+   else
-+       CONF_GCC_SUPPORTS_NO_PIE=NO
-+       AC_MSG_RESULT([no])
-+   fi
-+   rm -f conftest.c conftest.o conftest
-+])
-+
- dnl Small feature test for perl version. Assumes PerlCmd
- dnl contains path to perl binary.
- dnl
-Index: b/compiler/main/DriverPipeline.hs
-===================================================================
---- a/compiler/main/DriverPipeline.hs
-+++ b/compiler/main/DriverPipeline.hs
-@@ -1850,6 +1850,11 @@ linkBinary' staticLink dflags o_files de
-                       ++ map SysTools.Option (
-                          []
- 
-+                      -- See Note [No PIE eating when linking]
-+                      ++ (if sGccSupportsNoPie mySettings
-+                             then ["-no-pie"]
-+                             else [])
-+
-                       -- Permit the linker to auto link _symbol to _imp_symbol.
-                       -- This lets us link against DLLs without needing an "import library".
-                       ++ (if platformOS platform == OSMinGW32
-@@ -2147,6 +2152,11 @@ joinObjectFiles dflags o_files output_fn
-                        SysTools.Option "-nostdlib",
-                        SysTools.Option "-Wl,-r"
-                      ]
-+                        -- See Note [No PIE eating while linking] in SysTools
-+                     ++ (if sGccSupportsNoPie mySettings
-+                          then [SysTools.Option "-no-pie"]
-+                          else [])
-+
-                      ++ (if any (cc ==) [Clang, AppleClang, AppleClang51]
-                           then []
-                           else [SysTools.Option "-nodefaultlibs"])
-Index: b/compiler/main/DynFlags.hs
-===================================================================
---- a/compiler/main/DynFlags.hs
-+++ b/compiler/main/DynFlags.hs
-@@ -943,6 +943,7 @@ data Settings = Settings {
-   sLdSupportsBuildId       :: Bool,
-   sLdSupportsFilelist      :: Bool,
-   sLdIsGnuLd               :: Bool,
-+  sGccSupportsNoPie        :: Bool,
-   -- commands for particular phases
-   sPgm_L                 :: String,
-   sPgm_P                 :: (String,[Option]),
-Index: b/compiler/main/SysTools.hs
-===================================================================
---- a/compiler/main/SysTools.hs
-+++ b/compiler/main/SysTools.hs
-@@ -252,6 +252,7 @@ initSysTools mbMinusB
-        -- to make that possible, so for now you can't.
-        gcc_prog <- getSetting "C compiler command"
-        gcc_args_str <- getSetting "C compiler flags"
-+       gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"
-        cpp_prog <- getSetting "Haskell CPP command"
-        cpp_args_str <- getSetting "Haskell CPP flags"
-        let unreg_gcc_args = if targetUnregisterised
-@@ -344,6 +345,7 @@ initSysTools mbMinusB
-                     sLdSupportsBuildId       = ldSupportsBuildId,
-                     sLdSupportsFilelist      = ldSupportsFilelist,
-                     sLdIsGnuLd               = ldIsGnuLd,
-+                    sGccSupportsNoPie        = gccSupportsNoPie,
-                     sProgramName             = "ghc",
-                     sProjectVersion          = cProjectVersion,
-                     sPgm_L   = unlit_path,
-@@ -1601,6 +1603,15 @@ linesPlatform xs =
- 
- #endif
- 
-+{-
-+Note [No PIE eating while linking]
-+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+As of 2016 some Linux distributions (e.g. Debian) have started enabling -pie by
-+default in their gcc builds. This is incompatible with -r as it implies that we
-+are producing an executable. Consequently, we must manually pass -no-pie to gcc
-+when joining object files or linking dynamic libraries. See #12759.
-+-}
-+
- linkDynLib :: DynFlags -> [String] -> [UnitId] -> IO ()
- linkDynLib dflags0 o_files dep_packages
-  = do
-@@ -1766,6 +1777,10 @@ linkDynLib dflags0 o_files dep_packages
-                  ++ [ Option "-o"
-                     , FileOption "" output_fn
-                     ]
-+                    -- See Note [No PIE eating when linking]
-+                 ++ (if sGccSupportsNoPie (settings dflags)
-+                     then [Option "-no-pie"]
-+                     else [])
-                  ++ map Option o_files
-                  ++ [ Option "-shared" ]
-                  ++ map Option bsymbolicFlag
-Index: b/configure
-===================================================================
---- a/configure
-+++ b/configure
-@@ -665,6 +665,7 @@ SettingsPerlCommand
- SettingsArCommand
- SettingsLdFlags
- SettingsLdCommand
-+SettingsCCompilerSupportsNoPie
- SettingsCCompilerLinkFlags
- SettingsCCompilerFlags
- SettingsHaskellCPPFlags
-@@ -7976,6 +7977,23 @@ GccVersion=$fp_cv_gcc_version
- 
- 
- 
-+
-+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC supports -no-pie" >&5
-+$as_echo_n "checking whether GCC supports -no-pie... " >&6; }
-+   echo 'int main() { return 0; }' > conftest.c
-+   if ${CC-cc} -o conftest -no-pie conftest.c > /dev/null 2>&1; then
-+       CONF_GCC_SUPPORTS_NO_PIE=YES
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+   else
-+       CONF_GCC_SUPPORTS_NO_PIE=NO
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+   fi
-+   rm -f conftest.c conftest.o conftest
-+
-+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler is clang" >&5
- $as_echo_n "checking whether C compiler is clang... " >&6; }
- $CC -x c /dev/null -dM -E > conftest.txt 2>&1
-@@ -9337,10 +9355,12 @@ fi
-     fi
-     SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
-     SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
-+    SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE"
-     SettingsLdFlags="$CONF_LD_LINKER_OPTS_STAGE2"
- 
- 
- 
-+
- 
- 
- 
-Index: b/configure.ac
-===================================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -647,6 +647,9 @@ dnl     If gcc, make sure it's at least
- dnl
- FP_GCC_VERSION
- 
-+dnl ** See whether gcc supports -no-pie
-+FP_GCC_SUPPORTS_NO_PIE
-+
- dnl ** look to see if we have a C compiler using an llvm back end.
- dnl
- FP_CC_LLVM_BACKEND
-Index: b/distrib/configure.ac.in
-===================================================================
---- a/distrib/configure.ac.in
-+++ b/distrib/configure.ac.in
-@@ -103,6 +103,7 @@ if test "x$BinDistNeedsLibdw" = "xyes" ;
- fi
- 
- FP_GCC_VERSION
-+FP_GCC_SUPPORTS_NO_PIE
- AC_PROG_CPP
- 
- FP_PROG_LD_IS_GNU
-Index: b/settings.in
-===================================================================
---- a/settings.in
-+++ b/settings.in
-@@ -2,6 +2,7 @@
-  ("C compiler command", "@SettingsCCompilerCommand@"),
-  ("C compiler flags", "@SettingsCCompilerFlags@"),
-  ("C compiler link flags", "@SettingsCCompilerLinkFlags@"),
-+ ("C compiler supports -no-pie", "@SettingsCCompilerSupportsNoPie@"),
-  ("Haskell CPP command","@SettingsHaskellCPPCommand@"),
-  ("Haskell CPP flags","@SettingsHaskellCPPFlags@"),
-  ("ld command", "@SettingsLdCommand@"),
diff --git a/p/ghc/debian/patches/osdecommitmemory-compat.patch b/p/ghc/debian/patches/osdecommitmemory-compat.patch
index 001c01d..a659dc9 100644
--- a/p/ghc/debian/patches/osdecommitmemory-compat.patch
+++ b/p/ghc/debian/patches/osdecommitmemory-compat.patch
@@ -5,9 +5,11 @@ Bug: https://ghc.haskell.org/trac/ghc/ticket/12865
 Bug-Debian: https://bugs.debian.org/847677
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: b/rts/posix/OSMem.c
+===================================================================
 --- a/rts/posix/OSMem.c
 +++ b/rts/posix/OSMem.c
-@@ -506,11 +506,24 @@ void osDecommitMemory(void *at, W_ size)
+@@ -522,11 +522,24 @@ void osDecommitMemory(void *at, W_ size)
  
  #ifdef MADV_FREE
      // Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
diff --git a/p/ghc/debian/patches/reproducible-tmp-names b/p/ghc/debian/patches/reproducible-tmp-names
index a0417f1..a9357f4 100644
--- a/p/ghc/debian/patches/reproducible-tmp-names
+++ b/p/ghc/debian/patches/reproducible-tmp-names
@@ -4,11 +4,11 @@ up in the resulting binary (in the debug section), but not the directory.
 Instead of using the process id, create a hash from the command line arguments,
 and assume that is going to be unique.
 
-Index: ghc/compiler/main/SysTools.hs
+Index: b/compiler/main/SysTools.hs
 ===================================================================
---- ghc.orig/compiler/main/SysTools.hs	2016-04-23 17:57:12.812255430 +0200
-+++ ghc/compiler/main/SysTools.hs	2016-04-23 17:57:12.808255337 +0200
-@@ -65,6 +65,7 @@
+--- a/compiler/main/SysTools.hs
++++ b/compiler/main/SysTools.hs
+@@ -65,6 +65,7 @@ import Platform
  import Util
  import DynFlags
  import Exception
@@ -16,7 +16,7 @@ Index: ghc/compiler/main/SysTools.hs
  
  import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion)
  
-@@ -1158,8 +1159,8 @@
+@@ -1145,8 +1146,8 @@ getTempDir dflags = do
      mapping <- readIORef dir_ref
      case Map.lookup tmp_dir mapping of
          Nothing -> do
@@ -27,7 +27,7 @@ Index: ghc/compiler/main/SysTools.hs
              mask_ $ mkTempDir prefix
          Just dir -> return dir
    where
-@@ -1575,6 +1576,13 @@
+@@ -1562,6 +1563,13 @@ getProcessID :: IO Int
  getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
  #endif
  
diff --git a/p/ghc/debian/patches/series b/p/ghc/debian/patches/series
index e90f3de..869c987 100644
--- a/p/ghc/debian/patches/series
+++ b/p/ghc/debian/patches/series
@@ -5,13 +5,6 @@ hurd.diff
 buildpath-abi-stability.patch
 reproducible-tmp-names
 do-not-use-SHELL
-add-missing-MO_WriteBarrier
-no-pie
-find-tycon-panic
 compiler-cmm-PprC-sparc-alignment.patch
-get-linker-flags-correctly
 x32-use-native-x86_64-insn.patch
-fix-ppc-lwa-generation
 osdecommitmemory-compat.patch
-smp-arm-fix.patch
-R_X86_64_REX_GOTPCRELX
diff --git a/p/ghc/debian/patches/smp-arm-fix.patch b/p/ghc/debian/patches/smp-arm-fix.patch
deleted file mode 100644
index 7c4fea8..0000000
--- a/p/ghc/debian/patches/smp-arm-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -187,7 +187,7 @@
- # includes/stg/SMP.h
- ifeq "$(TargetArch_CPP)" "arm"
- # We don't support load/store barriers pre-ARMv7. See #10433.
--ArchSupportsSMP="$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)"
-+ArchSupportsSMP=$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)
- else
- ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc powerpc64 powerpc64le aarch64)))
- endif
diff --git a/p/ghc/debian/patches/use-debian-gen_contents_index b/p/ghc/debian/patches/use-debian-gen_contents_index
index 31378a1..d7b90a0 100644
--- a/p/ghc/debian/patches/use-debian-gen_contents_index
+++ b/p/ghc/debian/patches/use-debian-gen_contents_index
@@ -1,8 +1,8 @@
-Index: ghc/ghc.mk
+Index: b/ghc.mk
 ===================================================================
---- ghc.orig/ghc.mk	2016-05-21 17:05:28.794690704 +0200
-+++ ghc/ghc.mk	2016-05-21 17:05:28.790690606 +0200
-@@ -824,7 +824,6 @@
+--- a/ghc.mk
++++ b/ghc.mk
+@@ -824,7 +824,6 @@ endif
  # Build the Haddock contents and index
  ifeq "$(HADDOCK_DOCS)" "YES"
  libraries/dist-haddock/index.html: $(haddock_INPLACE) $(ALL_HADDOCK_FILES)
@@ -10,7 +10,7 @@ Index: ghc/ghc.mk
  ifeq "$(phase)" "final"
  $(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
  endif
-@@ -945,12 +944,8 @@
+@@ -945,12 +944,8 @@ endif
  	$(INSTALL_DIR) "$(DESTDIR)$(docdir)/html"
  	$(INSTALL_DOC) $(INSTALL_OPTS) docs/index.html "$(DESTDIR)$(docdir)/html"
  ifneq "$(INSTALL_LIBRARY_DOCS)" ""
@@ -24,7 +24,7 @@ Index: ghc/ghc.mk
  endif
  ifneq "$(INSTALL_HTML_DOC_DIRS)" ""
  	for i in $(INSTALL_HTML_DOC_DIRS); do \
-@@ -1059,7 +1054,6 @@
+@@ -1059,7 +1054,6 @@ $(eval $(call bindist-list,.,\
      mk/project.mk \
      mk/install.mk.in \
      bindist.mk \
diff --git a/p/ghc/debian/patches/x32-use-native-x86_64-insn.patch b/p/ghc/debian/patches/x32-use-native-x86_64-insn.patch
index 0abe8d6..680dd8c 100644
--- a/p/ghc/debian/patches/x32-use-native-x86_64-insn.patch
+++ b/p/ghc/debian/patches/x32-use-native-x86_64-insn.patch
@@ -12,9 +12,11 @@ Description: Use native x86_64 instructions on x32
  See: https://ghc.haskell.org/trac/ghc/ticket/11571
  .
 
---- ghc-8.0.1.orig/rts/RtsSymbols.c
-+++ ghc-8.0.1/rts/RtsSymbols.c
-@@ -737,7 +737,7 @@
+Index: b/rts/RtsSymbols.c
+===================================================================
+--- a/rts/RtsSymbols.c
++++ b/rts/RtsSymbols.c
+@@ -857,7 +857,7 @@
  
  
  // 64-bit support functions in libgcc.a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list