Commit 85323642 authored by Joachim Breitner's avatar Joachim Breitner

Merge branch 'ghc-from-experimental' into experimental

The packaging of GHC 7.10 was still in darcs. This converts this to a
git branch and pulls it in. Unfortunately, I was not able to craft its
history into the rest of the repository, but this should be good enough.
parents 78605b72 913475f4
......@@ -101,7 +101,7 @@ hashed_dependency(){
# As a transition measure, check if dpkg knows about this virtual package
if dpkg-query -W $virtual_pkg >/dev/null 2>/dev/null;
then
echo $virtual_pkg
echo $virtual_pkg
fi
}
......@@ -236,3 +236,4 @@ do
esac
shift
done
This diff is collapsed.
......@@ -2,25 +2,24 @@ Source: ghc
Section: haskell
Priority: extra
Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Uploaders: Joachim Breitner <nomeata@debian.org>,
Erik de Castro Lopo <erikd@mega-nerd.com>
Standards-Version: 3.9.5
Uploaders: Joachim Breitner <nomeata@debian.org>
Standards-Version: 3.9.6
Build-Depends:
debhelper (>= 9),
libgmp-dev,
devscripts,
ghc,
grep-dctrl,
dh-autoreconf,
autotools-dev,
llvm-3.4 [arm64 armel armhf],
libffi-dev,
grep-dctrl,
pkg-config,
ghc,
libgmp-dev,
llvm-3.5 [arm64 armel armhf],
libffi-dev,
binutils [arm64 armel armhf],
libncurses5-dev,
xsltproc,
docbook-xsl,
docbook-xml,
binutils [arm64 armel armhf],
libncurses5-dev,
dpkg-dev (>= 1.16.1.1)
Build-Depends-Indep:
hscolour,
......@@ -33,13 +32,30 @@ Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/ghc
Package: ghc
Architecture: any
Depends: llvm-3.4 [arm64 armel armhf], gcc, libgmp-dev, libffi-dev, libbsd-dev, libc6-dev, libncurses5-dev, ${shlibs:Depends}, ${misc:Depends}
Depends:
llvm-3.5 [arm64 armel armhf],
gcc,
libgmp-dev,
libffi-dev,
libbsd-dev,
libc6-dev,
libncurses5-dev,
${shlibs:Depends},
${misc:Depends}
Pre-Depends: dpkg (>= 1.16.1)
Provides: haskell-compiler, ${provided-devs}, ${haskell:Provides}, ${ghci}, ghc-dynamic
Replaces: ghc6 (<< 7), ghc-dynamic (<< 7.8)
Provides:
haskell-compiler,
ghc-dynamic,
${ghci},
${provided-devs},
${haskell:Provides},
haddock,
ghc-haddock,
${haddock:Provides}
Replaces: ghc6 (<< 7), ghc-dynamic (<< 7.8), ghc-haddock (<< 7.10)
Conflicts: ghc6 (<< 7), ghc-dynamic (<< 7.8), ${conflicting-devs}
Breaks: cabal-install (<< 0.8.0), haskell-devscripts (<< 0.8.13), ghc-doc (<< 7.8)
Suggests: perl, ghc-prof, ghc-doc, haskell-doc, llvm-3.4
Breaks: cabal-install (<< 0.8.0), haskell-devscripts (<< 0.8.13), ghc-doc (<< 7.10), ghc-haddock (<< 7.10)
Suggests: perl, ghc-prof, ghc-doc, haskell-doc, llvm-3.5
Description: The Glasgow Haskell Compilation system
The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for
Haskell.
......@@ -88,27 +104,3 @@ Description: Documentation for the Glasgow Haskell Compilation system
.
This package includes HTML, DVI and PS versions of the SGML-based
documentation around GHC.
Package: ghc-haddock
Architecture: any
Provides: haddock, ${haddock:Provides}
Conflicts: haddock
Breaks: ghc-doc (<< 7.6.3-20~)
Depends: ghc (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
Homepage: http://www.haskell.org/haddock/
Description: Documentation tool for annotated Haskell source code
Haddock is a tool for automatically generating documentation from
annotated Haskell source code. It is primary intended for documenting
libraries, but it should be useful for any kind of Haskell code.
.
Haddock lets you write documentation annotations next to the
definitions of functions and types in the source code, in a syntax
that is easy on the eye when writing the source code (no heavyweight
mark-up). The documentation generated by Haddock is fully hyperlinked:
click on a type name in a type signature to go straight to the
definition, and documentation, for that type.
.
Haddock can generate documentation in multiple formats; currently HTML
is implemented, and there is partial support for generating DocBook.
.
This package contains Haddock version 2.10.0.
......@@ -49,7 +49,7 @@ DAMAGE.
GHC includes libffi.
libffi - Copyright (c) 1996-2008 Red Hat, Inc and others.
libffi - Copyright (c) 1996-2008 Red Hat, Inc and others.
See source files for details.
Permission is hereby granted, free of charge, to any person obtaining
......
......@@ -22,7 +22,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# 2) BSD 3-clause license.
#
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -39,7 +39,7 @@
#
# * The names of contributors may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
......@@ -53,7 +53,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
set -e
if test -e debian/Dh_Haskell.sh
then
......
File mode changed from 100755 to 100644
# This is part of the haddock file work-around. By installing these directories
# also in ghc-doc, we ensure that they are removed eventually by dpkg.
/usr/lib/ghc-7.0.2/haddock
/usr/lib/ghc-7.0.3/haddock
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -40,3 +40,4 @@ esac
#DEBHELPER#
exit 0
interest-noawait /usr/lib/ghc-doc/haddock
interest-noawait /usr/lib/ghc-7.0.2/haddock
interest-noawait /usr/lib/ghc-7.0.3/haddock
interest-noawait /var/lib/ghc/package.conf.d
interest-noawait /var/lib/ghc-7.0.3/package.conf.d
interest-noawait /var/lib/ghc-7.0.4/package.conf.d
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -38,3 +38,4 @@ esac
#DEBHELPER#
exit 0
......@@ -36,3 +36,4 @@ esac
#DEBHELPER#
exit 0
......@@ -5,9 +5,9 @@ set -e
case "$1" in
upgrade)
# Remove the .cache file of any previous ghc6 installation, to avoid dpkg warnings
# Remove the .cache file of any previous ghc6 installation, to avoid dpkg warnings
# about non-empty directories to be remoed.
rm -f /var/lib/ghc-6.*/package.conf.d/package.cache || true
rm -f /var/lib/ghc-6.*/package.conf.d/package.cache || true
exit 0
;;
install|abort-upgrade)
......
......@@ -47,12 +47,12 @@ directory in which to put the output files
.TP
\fB\-i \fIFILE\fP, \-\-read-interface=\fIFILE\fP
read an interface from
read an interface from
.IR FILE .
.TP
\fB\-D \fIFILE\fP, \-\-dump\-interface=\fIFILE\fP
dump an interface for these modules in
dump an interface for these modules in
.IR FILE .
.TP
......@@ -63,7 +63,7 @@ location of Haddock's auxiliary files
.BR \-h ", " \-\-html
Generate documentation in HTML format.
Several files will be generated into the current directory (or the specified
directory if the
directory if the
.B \-o
option is given), including the following:
.RS
......@@ -94,7 +94,7 @@ output for Hoogle
.TP
\fB\-\-html\-help=\fIformat
produce index and table of contents in mshelp, mshelp2 or devhelp format
produce index and table of contents in mshelp, mshelp2 or devhelp format
(with \fI\-h\fP)
.TP
......@@ -126,7 +126,7 @@ URL for a comments link for each entity (using the %{FILE}, %{MODULE} or %{NAME}
Use the CSS
.I FILE
instead of the default stylesheet that comes with
.B haddock
.B haddock
for HTML output. It should specify certain classes: see the default stylesheet for details.
.TP
......@@ -145,7 +145,7 @@ The title should be a plain string (no markup please!).
Specify the package name (optional).
.TP
.BR \-n ", " \-\-no\-implicit\-prelude
.BR \-n ", " \-\-no\-implicit\-prelude
do not assume Prelude is imported
.TP
......@@ -181,7 +181,7 @@ Use a separately-generated HTML index.
Generate an HTML index from specified interfaces.
.TP
.B \-\-ignore\-all\-exports
.B \-\-ignore\-all\-exports
Behave as if all modules have the ignore-exports atribute
.TP
......@@ -189,7 +189,7 @@ Behave as if all modules have the ignore-exports atribute
Behave as if \fIMODULE\fP has the hide attribute.
.TP
\fB\-\-use\-package=\fIPACKAGE
\fB\-\-use\-package=\fIPACKAGE
The modules being processed depend on \fIPACKAGE\fP.
.SH FILES
......
......@@ -6,11 +6,11 @@ Author: Jani Monoses <jani@ubuntu.com>
Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
Launchpad-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
Index: ghc-7.9.20140130/aclocal.m4
Index: ghc-7.10.1/aclocal.m4
===================================================================
--- ghc-7.9.20140130.orig/aclocal.m4 2014-01-31 12:18:23.422195819 +0000
+++ ghc-7.9.20140130/aclocal.m4 2014-01-31 12:18:23.418195819 +0000
@@ -408,7 +408,7 @@
--- ghc-7.10.1.orig/aclocal.m4 2015-05-11 22:23:40.197727806 +0200
+++ ghc-7.10.1/aclocal.m4 2015-05-11 22:23:40.197727806 +0200
@@ -411,7 +411,7 @@
)],
[changequote(, )dnl
ARM_ISA=ARMv7
......
From 5fcb235d132065bc08752612f91a6d7c01d4fd6d Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <siarheit@google.com>
Date: Wed, 13 May 2015 23:13:57 +0100
Subject: [PATCH] includes/stg/SMP.h: implement load_/store_load_barrier on
armv6 and older
Fixes trac: #10244
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
---
includes/stg/SMP.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 5ded05d..5460a2b 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -373,6 +373,8 @@ store_load_barrier(void) {
__asm__ __volatile__ ("sync" : : : "memory");
#elif sparc_HOST_ARCH
__asm__ __volatile__ ("membar #StoreLoad" : : : "memory");
+#elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7)
+ __asm__ __volatile__ ("" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb" : : : "memory");
#elif aarch64_HOST_ARCH
@@ -395,6 +397,8 @@ load_load_barrier(void) {
#elif sparc_HOST_ARCH
/* Sparc in TSO mode does not require load/load barriers. */
__asm__ __volatile__ ("" : : : "memory");
+#elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7)
+ __asm__ __volatile__ ("" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb" : : : "memory");
#elif aarch64_HOST_ARCH
--
2.3.6
Index: ghc-7.10/compiler/main/DynFlags.hs
===================================================================
--- ghc-7.10.orig/compiler/main/DynFlags.hs 2015-07-21 15:52:57.000000000 +0200
+++ ghc-7.10/compiler/main/DynFlags.hs 2015-08-16 14:57:09.000000000 +0200
@@ -52,7 +52,7 @@
dynFlagDependencies,
tablesNextToCode, mkTablesNextToCode,
SigOf(..), getSigOf,
- checkOptLevel,
+ makeDynFlagsConsistent,
Way(..), mkBuildTag, wayRTSOnly, addWay', updateWays,
wayGeneralFlags, wayUnsetGeneralFlags,
@@ -4110,10 +4110,13 @@
8 -> toInteger (maxBound :: Word64)
w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)
+-- | Resolve any internal inconsistencies in a set of 'DynFlags'.
+-- Returns the consistent 'DynFlags' as well as a list of warnings
+-- to report to the user.
+makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
-- Whenever makeDynFlagsConsistent does anything, it starts over, to
-- ensure that a later change doesn't invalidate an earlier check.
-- Be careful not to introduce potential loops!
-makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
makeDynFlagsConsistent dflags
-- Disable -dynamic-too on Windows (#8228, #7134, #5987)
| os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags
@@ -4152,6 +4155,8 @@
not (gopt Opt_PIC dflags)
= loop (gopt_set dflags Opt_PIC)
"Enabling -fPIC as it is always on for this platform"
+ | Left err <- checkOptLevel (optLevel dflags) dflags
+ = loop (updOptLevel 0 dflags) err
| otherwise = (dflags, [])
where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")
loop updated_dflags warning
@@ -4161,6 +4166,33 @@
arch = platformArch platform
os = platformOS platform
+{-
+Note [DynFlags consistency]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+There are a number of number of DynFlags configurations which either
+do not make sense or lead to unimplemented or buggy codepaths in the
+compiler. makeDynFlagsConsistent is responsible for verifying the validity
+of a set of DynFlags, fixing any issues, and reporting them back to the
+caller.
+
+GHCi and -O
+---------------
+
+When using optimization, the compiler can introduce several things
+(such as unboxed tuples) into the intermediate code, which GHCi later
+chokes on since the bytecode interpreter can't handle this (and while
+this is arguably a bug these aren't handled, there are no plans to fix
+it.)
+
+While the driver pipeline always checks for this particular erroneous
+combination when parsing flags, we also need to check when we update
+the flags; this is because API clients may parse flags but update the
+DynFlags afterwords, before finally running code inside a session (see
+T10052 and #10052).
+
+-}
+
--------------------------------------------------------------------------
-- Do not use unsafeGlobalDynFlags!
--
Index: ghc-7.10/compiler/main/GHC.hs
===================================================================
--- ghc-7.10.orig/compiler/main/GHC.hs 2015-07-21 15:52:50.000000000 +0200
+++ ghc-7.10/compiler/main/GHC.hs 2015-08-16 14:57:09.000000000 +0200
@@ -608,32 +608,15 @@
-> m (DynFlags, [Located String], [Located String])
parseDynamicFlags = parseDynamicFlagsCmdLine
-{- Note [GHCi and -O]
-~~~~~~~~~~~~~~~~~~~~~
-When using optimization, the compiler can introduce several things
-(such as unboxed tuples) into the intermediate code, which GHCi later
-chokes on since the bytecode interpreter can't handle this (and while
-this is arguably a bug these aren't handled, there are no plans to fix
-it.)
-
-While the driver pipeline always checks for this particular erroneous
-combination when parsing flags, we also need to check when we update
-the flags; this is because API clients may parse flags but update the
-DynFlags afterwords, before finally running code inside a session (see
-T10052 and #10052).
--}
-
-- | Checks the set of new DynFlags for possibly erroneous option
-- combinations when invoking 'setSessionDynFlags' and friends, and if
-- found, returns a fixed copy (if possible).
checkNewDynFlags :: MonadIO m => DynFlags -> m DynFlags
-checkNewDynFlags dflags
- -- See Note [GHCi and -O]
- | Left e <- checkOptLevel (optLevel dflags) dflags
- = do liftIO $ warningMsg dflags (text e)
- return (dflags { optLevel = 0 })
- | otherwise
- = return dflags
+checkNewDynFlags dflags = do
+ -- See Note [DynFlags consistency]
+ let (dflags', warnings) = makeDynFlagsConsistent dflags
+ liftIO $ handleFlagWarnings dflags warnings
+ return dflags'
-- %************************************************************************
-- %* *
From 9f2e286b0c6da163ee6196c34be115260b5008e6 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 11 May 2015 15:18:37 +0100
Subject: [PATCH] rts/Linker.c: add some more PPC relocations (#10402)
This implements R_PPC_PLTREL24, R_PPC_REL16_LO, R_PPC_REL16_HI, and
R_PPC_REL16_HA, emitted by other parts of the current toolchain.
---
rts/Linker.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Index: ghc-7.8.4/rts/Linker.c
===================================================================
--- ghc-7.8.4.orig/rts/Linker.c 2015-05-13 21:04:36.925078989 +0200
+++ ghc-7.8.4/rts/Linker.c 2015-05-13 21:04:36.921078903 +0200
@@ -5622,6 +5622,7 @@
break;
case R_PPC_REL24:
+ case R_PPC_PLTREL24:
delta = value - P;
if( delta << 6 >> 6 != delta )
@@ -5641,6 +5642,18 @@
*(Elf_Word *) P = (*(Elf_Word *) P & 0xfc000003)
| (delta & 0x3fffffc);
break;
+
+ case R_PPC_REL16_LO:
+ *(Elf32_Half*) P = value - P;
+ break;
+
+ case R_PPC_REL16_HI:
+ *(Elf32_Half*) P = (value - P) >> 16;
+ break;
+
+ case R_PPC_REL16_HA:
+ *(Elf32_Half*) P = (value + 0x8000 - P) >> 16;
+ break;
# endif
#if x86_64_HOST_ARCH
This diff is collapsed.
Forwarded: https://ghc.haskell.org/trac/ghc/ticket/10424
Index: ghc-7.8.4/compiler/iface/MkIface.lhs
Index: ghc-7.10.1/compiler/iface/MkIface.hs
===================================================================
--- ghc-7.8.4.orig/compiler/iface/MkIface.lhs 2015-05-17 23:15:16.294100501 +0200
+++ ghc-7.8.4/compiler/iface/MkIface.lhs 2015-05-17 23:15:16.294100501 +0200
@@ -607,7 +607,7 @@
--- ghc-7.10.1.orig/compiler/iface/MkIface.hs 2015-05-17 20:34:02.808643844 +0200
+++ ghc-7.10.1/compiler/iface/MkIface.hs 2015-05-17 20:34:02.804643799 +0200
@@ -611,7 +611,7 @@
iface_hash <- computeFingerprint putNameLiterally
(mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
......@@ -11,14 +10,14 @@ Index: ghc-7.8.4/compiler/iface/MkIface.lhs
+ usages,
sorted_deps,
mi_hpc iface0)
@@ -639,6 +639,9 @@
@@ -644,6 +644,9 @@
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0)
+ -- Do not allow filenames to affect the interface
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
+
getOrphanHashes :: HscEnv -> [Module] -> IO [Fingerprint]
getOrphanHashes hsc_env mods = do
Provided by Edmund Grimley Evans in http://bugs.debian.org/783987 based on
https://git.haskell.org/ghc.git/commit/0bbc2ac6dae9ce2838f23a75a6a989826c06f3f5
https://git.haskell.org/ghc.git/commit/1e8c9b81a819da8eb54405a029fc33a9f5220321
Not in 7.10.1, but one patch likely to be in 7.10.2, see
https://ghc.haskell.org/trac/ghc/ticket/9673
Index: ghc-7.8.4/aclocal.m4
===================================================================
--- ghc-7.8.4.orig/aclocal.m4 2015-05-04 09:45:38.144580614 +0200
+++ ghc-7.8.4/aclocal.m4 2015-05-04 09:45:38.140580592 +0200
@@ -556,8 +556,11 @@
$3="$$3 -D_HPUX_SOURCE"
$5="$$5 -D_HPUX_SOURCE"
;;
- arm*)
- # On arm, link using gold
+ arm*linux* | \
+ aarch64*linux* )
+ # On arm/linux, aarch64/linux, arm/android and aarch64/android, tell
+ # gcc to link using the gold linker.
+ # Forcing LD to be ld.gold is done in FIND_LD m4 macro.
$3="$$3 -fuse-ld=gold"
;;
esac
@@ -2074,6 +2077,30 @@
fi
])
+# FIND_LD
+# Find the version of `ld` to use. This is used in both in the top level
+# configure.ac and in distrib/configure.ac.in.
+#
+# $1 = the variable to set
+#
+AC_DEFUN([FIND_LD],[
+ FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld])
+ case $target in
+ arm*linux* | \
+ aarch64*linux* )
+ # Arm and Aarch64 requires use of the binutils ld.gold linker.
+ # This case should catch at least arm-unknown-linux-gnueabihf,
+ # arm-linux-androideabi, arm64-unknown-linux and
+ # aarch64-linux-android
+ FP_ARG_WITH_PATH_GNU_PROG([LD_GOLD], [ld.gold], [ld.gold])
+ $1="$LD_GOLD"
+ ;;
+ *)
+ $1="$LD"
+ ;;
+ esac
+])
+
# FIND_GCC()
# --------------------------------
# Finds where gcc is
Index: ghc-7.8.4/mk/config.mk.in
===================================================================
--- ghc-7.8.4.orig/mk/config.mk.in 2015-05-04 09:45:38.144580614 +0200
+++ ghc-7.8.4/mk/config.mk.in 2015-05-04 09:45:38.140580592 +0200
@@ -176,7 +176,7 @@
# ArchSupportsSMP should be set iff there is support for that arch in
# includes/stg/SMP.h
-ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc arm)))
+ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc arm aarch64)))
GhcWithSMP := $(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
@@ -184,7 +184,7 @@
# has support for this OS/ARCH combination.
OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu)))
-ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc sparc sparc64 arm)))
+ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc sparc sparc64 arm aarch64)))
ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
GhcWithInterpreter=YES
Index: ghc-7.9.20140130/utils/haddock/haddock.cabal
===================================================================
--- ghc-7.9.20140130.orig/utils/haddock/haddock.cabal 2014-01-31 15:37:04.853698870 +0000
+++ ghc-7.9.20140130/utils/haddock/haddock.cabal 2014-01-31 15:37:04.853698870 +0000
@@ -147,8 +147,6 @@
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
- else
- build-depends: ghc-paths
hs-source-dirs: src, vendor/attoparsec-0.10.4.0
if flag(dev)
Index: ghc-7.9.20140130/utils/haddock/src/Haddock.hs
===================================================================
--- ghc-7.9.20140130.orig/utils/haddock/src/Haddock.hs 2014-01-31 15:37:04.853698870 +0000
+++ ghc-7.9.20140130/utils/haddock/src/Haddock.hs 2014-01-31 15:37:04.853698870 +0000
@@ -51,7 +51,6 @@
#ifdef IN_GHC_TREE
import System.FilePath
#else
-import qualified GHC.Paths as GhcPaths
import Paths_haddock
#endif
@@ -380,14 +379,14 @@
libDir <- getInTreeDir
return (ghcPath, libDir)
#else
- return (ghcPath, GhcPaths.libdir)
+ return (ghcPath, "/usr/lib/ghc")
#endif
xs -> return (ghcPath, last xs)
where
#ifdef IN_GHC_TREE
ghcPath = "not available"
#else
- ghcPath = GhcPaths.ghc
+ ghcPath = "/usr/bin/ghc"
#endif
Provided by “Pino” via Samuel Thibault. Not yet pushed upstream.
Index: ghc-7.8.4/aclocal.m4
Index: ghc-7.10/aclocal.m4
===================================================================
--- ghc-7.8.4.orig/aclocal.m4 2015-05-01 08:18:15.978547005 +0200
+++ ghc-7.8.4/aclocal.m4 2015-05-01 08:18:15.974546986 +0200
--- ghc-7.10.orig/aclocal.m4 2015-06-15 09:26:58.080646221 +0200
+++ ghc-7.10/aclocal.m4 2015-06-15 09:26:58.076646183 +0200
@@ -271,12 +271,15 @@
nto-qnx)
test -z "[$]2" || eval "[$]2=OSQNXNTO"
......@@ -21,19 +21,19 @@ Index: ghc-7.8.4/aclocal.m4
*)
echo "Unknown OS '[$]1'"
exit 1
Index: ghc-7.8.4/compiler/utils/Platform.hs
Index: ghc-7.10/compiler/utils/Platform.hs
===================================================================
--- ghc-7.8.4.orig/compiler/utils/Platform.hs 2015-05-01 08:18:15.978547005 +0200
+++ ghc-7.8.4/compiler/utils/Platform.hs 2015-05-01 08:18:15.974546986 +0200
@@ -81,6 +81,7 @@
--- ghc-7.10.orig/compiler/utils/Platform.hs 2015-06-15 09:26:58.080646221 +0200
+++ ghc-7.10/compiler/utils/Platform.hs 2015-06-15 09:26:58.076646183 +0200
@@ -83,6 +83,7 @@
| OSOsf3
| OSQNXNTO
| OSAndroid
+ | OSHurd
deriving (Read, Show, Eq)
-- | ARM Instruction Set Architecture, Extensions and ABI
@@ -125,6 +126,7 @@
@@ -127,6 +128,7 @@
-- per comment below it's safe
osElfTarget OSQNXNTO = False
osElfTarget OSAndroid = True
......
From: Dejan Latinovic <Dejan.Latinovic@imgtec.com>
Subject: ghc 7.8.2 FTBFS for mips/mipsel
Date: Fri, 13 Jun 2014 11:42:27 +0000
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751479
A patch that adds mips and mipsel into NoSharedLibsPlatformList
is attached.
After applying this patch,
I was able to successfully build ghc 7.8.2 for mips nad mipsel.
Index: ghc-7.8.3/mk/config.mk.in
===================================================================
--- ghc-7.8.3.orig/mk/config.mk.in 2014-07-18 22:46:32.190912601 +0200
+++ ghc-7.8.3/mk/config.mk.in 2014-07-18 22:46:44.622912143 +0200
@@ -99,7 +99,9 @@
x86_64-unknown-mingw32 \
i386-unknown-mingw32 \
sparc-sun-solaris2 \
- sparc-unknown-linux
+ sparc-unknown-linux \
+ mips-unknown-linux \
+ mipsel-unknown-linux
ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
NoSharedLibsPlatformList += i386-unknown-solaris2
......@@ -3,11 +3,11 @@ Description: Do not emit a warning if the .haddock file is missing
without the -doc package.
Author: Joachim Breitner <nomeata@debian.org>
Index: ghc-7.9.20140130/utils/ghc-pkg/Main.hs
Index: ghc-7.10/utils/ghc-pkg/Main.hs
===================================================================
--- ghc-7.9.20140130.orig/utils/ghc-pkg/Main.hs 2014-01-31 12:18:37.474195233 +0000
+++ ghc-7.9.20140130/utils/ghc-pkg/Main.hs 2014-01-31 12:18:37.474195233 +0000
@@ -1378,8 +1378,10 @@
--- ghc-7.10.orig/utils/ghc-pkg/Main.hs 2015-07-22 11:17:04.787751658 +0200
+++ ghc-7.10/utils/ghc-pkg/Main.hs 2015-07-22 11:17:04.787751658 +0200
@@ -1533,8 +1533,10 @@
mapM_ (checkDir True "library-dirs") (libraryDirs pkg)
mapM_ (checkDir True "include-dirs") (includeDirs pkg)
mapM_ (checkDir True "framework-dirs") (frameworkDirs pkg)
......@@ -17,6 +17,6 @@ Index: ghc-7.9.20140130/utils/ghc-pkg/Main.hs
+ -- documentation. Do not print a warning there.
+ -- mapM_ (checkFile True "haddock-interfaces") (haddockInterfaces pkg)
+ -- mapM_ (checkDirURL True "haddock-html") (haddockHTMLs pkg)
checkModules pkg
mapM_ (checkHSLib verbosity (libraryDirs pkg) auto_ghci_libs) (hsLibraries pkg)
-- ToDo: check these somehow?
checkDuplicateModules pkg
checkExposedModules db_stack pkg
checkOtherModules pkg
This is an attempt to make GHC build reproducible. The name of .c files may end
up in the resulting binary (in the debug section), but not the directory.
Since the temporary directory already contains the process id, there is no need
to put it into the filename as well.
Instead of using the process id, create a hash from the command line arguments,
and assume that is going to be unique.
Index: ghc-7.8.4/compiler/main/SysTools.lhs
Index: ghc-7.10/compiler/main/SysTools.hs
===================================================================
--- ghc-7.8.4.orig/compiler/main/SysTools.lhs 2014-12-19 16:35:34.000000000 +0100
+++ ghc-7.8.4/compiler/main/SysTools.lhs 2015-06-07 16:20:31.875021456 +0200
@@ -58,6 +58,7 @@
--- ghc-7.10.orig/compiler/main/SysTools.hs 2015-07-21 15:52:50.000000000 +0200
+++ ghc-7.10/compiler/main/SysTools.hs 2015-08-16 14:57:09.000000000 +0200
@@ -61,6 +61,7 @@
import Util
import DynFlags
import Exception
+import Fingerprint
import Data.IORef