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
ghc (7.10.2-2) experimental; urgency=medium
* Backport patch to fix GHC bug #10549, to unbreak shakes test suite
-- Joachim Breitner <nomeata@debian.org> Sun, 16 Aug 2015 15:05:54 +0200
ghc (7.10.2-1) experimental; urgency=medium
* New upstream release
-- Joachim Breitner <nomeata@debian.org> Wed, 22 Jul 2015 11:17:24 +0200
ghc (7.10.1.20150630-2) experimental; urgency=medium
* Remove PPC-relocations.patch
-- Joachim Breitner <nomeata@debian.org> Sat, 04 Jul 2015 10:06:16 +0200
ghc (7.10.1.20150630-1) experimental; urgency=medium
[ Joachim Breitner ]
* New upstream release candidate, 7.10.2-rc2
* Clean up debian/control a bit, based on a patch by Gianfranco
[ Gianfranco Costamagna ]
* Bump std version
* Refactor rules file to use dh
-- Joachim Breitner <nomeata@debian.org> Fri, 03 Jul 2015 12:28:07 +0200
ghc (7.10.1.20150612-1) experimental; urgency=medium
* Calculate haddock interface version using the built haddock, not the
installed (Thanks to David Fox for noticing).
* New upstream release randidate (7.10.2-rc1)
* Merge from unstable
-- Joachim Breitner <nomeata@debian.org> Mon, 15 Jun 2015 09:41:16 +0200
ghc (7.10.1-5) experimental; urgency=medium
* Merge from unstable (Closes: #785282, #785194 )
* A lucky guess at making GHC build reproducible, by not putting the process
id in temporary filenames.
-- Joachim Breitner <nomeata@debian.org> Sun, 24 May 2015 10:47:09 +0200
ghc (7.10.1-4) experimental; urgency=medium
* Fix patch/ghc-7.8.4-3-aarch64.patch; dropped a hunk when upgrading to
7.10 that I should not have dropped. Thanks Gianfranco Costamagna for
noticing.
-- Joachim Breitner <nomeata@debian.org> Thu, 14 May 2015 23:16:55 +0200
ghc (7.10.1-3) experimental; urgency=medium
* Apply patch by Sergei Trofimovich to implement load_/store_load_barrier on
armv6 and older (upstream ticket #10244)
-- Joachim Breitner <nomeata@debian.org> Thu, 14 May 2015 09:37:06 +0200
ghc (7.10.1-2) experimental; urgency=medium
* Build against llvm-3.5 (Closes: 784245)
-- Joachim Breitner <nomeata@debian.org> Wed, 13 May 2015 11:18:54 +0200
ghc (7.10.1-1) experimental; urgency=medium
* New upstream release. Optimistically dropping lots of patches, lets see
what now works out of the box.
* Ship haddock with ghc, and leave (most) paths as they are. It is easier to
not fight against the way upstream builds and installs stuff.
* Remove the hack introduced in 7.2.0 for a clean upgrade from 7.0.3.
-- Joachim Breitner <nomeata@debian.org> Tue, 12 May 2015 12:41:40 +0200
ghc (7.8.4-9) unstable; urgency=medium
* Another stab at making GHC more reproducible: Use a hash of the command
......@@ -29,7 +107,7 @@ ghc (7.8.4-6) unstable; urgency=medium
ghc (7.8.4-5) unstable; urgency=medium
* New patch patches/PPC-relocations.patch by Colin Watson, Closes: #785194
* New patch patches/PPC-relocations.patch by Colin Watson, Closes: #785194
-- Joachim Breitner <nomeata@debian.org> Wed, 13 May 2015 21:06:05 +0200
......@@ -58,7 +136,7 @@ ghc (7.8.4-2) unstable; urgency=medium
* Fix debian/rules syntax (tab instead of spaces) to unbreak build on armel,
armhf
* Apply all hacks for armel and armhf also on arm64
* Apply all hacks for armel and armhf also on arm64
-- Joachim Breitner <nomeata@debian.org> Thu, 30 Apr 2015 09:08:39 +0200
......@@ -88,13 +166,13 @@ ghc (7.8.20141223-1) experimental; urgency=medium
ghc (7.8.20141119-8) experimental; urgency=medium
* Now that the package builds on armel and armhf, try to build with GHCi
enabled.
enabled.
-- Joachim Breitner <nomeata@debian.org> Tue, 09 Dec 2014 14:29:13 +0100
ghc (7.8.20141119-7) experimental; urgency=medium
* Apply patches taken from GHC HEAD that help building on ARM
* Apply patches taken from GHC HEAD that help building on ARM
- always_build_arm_spinlocks.patch
- dll-split-fix.patch
- linker-detection-fix
......@@ -103,13 +181,13 @@ ghc (7.8.20141119-7) experimental; urgency=medium
* Pass -fuse-ld=gold to gcc when used as alinker on arm
(patches/use-gold-on-arm) and make sure this setting does not affect other
parts (patches/saner-linker-opt-handling).
* Try to handle autoreconf saner, by simply calling perl bool
* Try to handle autoreconf saner, by simply calling perl bool
-- Joachim Breitner <nomeata@debian.org> Mon, 08 Dec 2014 19:08:01 +0100
ghc (7.8.20141119-6) experimental; urgency=medium
* According to Ben Gamari, the flag is -optl-B..., not -optc-B...
* According to Ben Gamari, the flag is -optl-B..., not -optc-B...
* Do not pass -mlong-calls to gcc on arm, on the grounds that upstream is
not doing it.
......@@ -117,13 +195,13 @@ ghc (7.8.20141119-6) experimental; urgency=medium
ghc (7.8.20141119-5) experimental; urgency=medium
* Try using ld.gold on arm, using -optc-B/usr/bin/ld.gold
* Try using ld.gold on arm, using -optc-B/usr/bin/ld.gold
-- Joachim Breitner <nomeata@debian.org> Sun, 30 Nov 2014 18:51:45 +0100
ghc (7.8.20141119-4) experimental; urgency=medium
* Try using ld.gold on arm.
* Try using ld.gold on arm.
-- Joachim Breitner <nomeata@debian.org> Fri, 28 Nov 2014 22:15:29 +0100
......@@ -135,13 +213,13 @@ ghc (7.8.20141119-3) experimental; urgency=medium
ghc (7.8.20141119-2) experimental; urgency=medium
* Explicitly depend on llvm-3.4 on arm, maybe that works better.
* Explicitly depend on llvm-3.4 on arm, maybe that works better.
-- Joachim Breitner <nomeata@debian.org> Wed, 26 Nov 2014 16:14:54 +0100
ghc (7.8.20141119-1) experimental; urgency=medium
* New upstream release candidate (7.8.4-rc1)
* New upstream release candidate (7.8.4-rc1)
-- Joachim Breitner <nomeata@debian.org> Wed, 26 Nov 2014 10:12:08 +0100
......@@ -157,7 +235,7 @@ ghc (7.8.20140710-4) experimental; urgency=medium
ghc (7.8.20140710-3) experimental; urgency=medium
* Depend on libncurses5-dev, since we ship terminfo in ghc now. Thanks to
David Fox for noticing.
David Fox for noticing.
-- Joachim Breitner <nomeata@debian.org> Wed, 16 Jul 2014 19:50:39 +0200
......@@ -183,7 +261,7 @@ ghc (7.8.20140411-5) experimental; urgency=medium
ghc (7.8.20140411-4) experimental; urgency=medium
* Merge 7.6.3-9 to 7.6.3-12 from unstable
* Merge 7.6.3-9 to 7.6.3-12 from unstable
-- Joachim Breitner <nomeata@debian.org> Tue, 10 Jun 2014 12:25:10 +0200
......@@ -196,7 +274,7 @@ ghc (7.8.20140411-3) experimental; urgency=medium
ghc (7.8.20140411-2) experimental; urgency=medium
* Try building without hardening and see what architectures work then.
* Try building without hardening and see what architectures work then.
-- Joachim Breitner <nomeata@debian.org> Mon, 28 Apr 2014 16:21:08 +0200
......@@ -229,7 +307,7 @@ ghc (7.8.20140228-1) experimental; urgency=medium
ghc (7.8.20140130-3) experimental; urgency=medium
* transformers now comes with ghc, put it in the Provides line
* transformers now comes with ghc, put it in the Provides line
-- Joachim Breitner <nomeata@debian.org> Sun, 09 Feb 2014 20:54:01 +0000
......@@ -317,7 +395,7 @@ ghc (7.6.3-12) unstable; urgency=medium
ghc (7.6.3-11) unstable; urgency=medium
* Do no conflict with libghc-cabal-dev.
* Do no conflict with libghc-cabal-dev.
-- Joachim Breitner <nomeata@debian.org> Sun, 08 Jun 2014 13:56:51 +0200
......@@ -394,14 +472,14 @@ ghc (7.6.3-3) unstable; urgency=low
http://hackage.haskell.org/trac/ghc/ticket/7794)
* Do not create system-wide documentation index if /usr/share/doc is
missing. (Closes: #709911)
* Create a symlink from prof_scc.png to prof_scc (Closes: #664043)
* Create a symlink from prof_scc.png to prof_scc (Closes: #664043)
-- Joachim Breitner <nomeata@debian.org> Wed, 05 Jun 2013 20:57:49 +0200
ghc (7.6.3-2) unstable; urgency=low
* Enable compat level 9
* Remove transitional ghc6-* packages
* Remove transitional ghc6-* packages
-- Joachim Breitner <nomeata@debian.org> Fri, 24 May 2013 11:12:19 +0200
......@@ -419,7 +497,7 @@ ghc (7.6.2-1) experimental; urgency=low
ghc (7.6.1.20121207-2) experimental; urgency=low
* Typo in ghc-haddocks Provides, thanks to David Fox for noticing.
* Typo in ghc-haddocks Provides, thanks to David Fox for noticing.
-- Joachim Breitner <nomeata@debian.org> Thu, 13 Dec 2012 18:33:48 +0100
......@@ -437,7 +515,7 @@ ghc (7.6.1.20121207-1) experimental; urgency=low
ghc (7.6.1-3) experimental; urgency=low
* Bump standards version, no change
* Change VCS fields back to regular repo
* Change VCS fields back to regular repo
* Build the runtime also in the thr_debug_p way, suggestion by Michał J.
Gajda
......@@ -446,13 +524,13 @@ ghc (7.6.1-3) experimental; urgency=low
ghc (7.6.1-2) experimental; urgency=low
* Do not Provide transformers, it is only used internally.
* Ensure this is not used with unstables haskell-devscripts
* Ensure this is not used with unstables haskell-devscripts
-- Joachim Breitner <nomeata@debian.org> Mon, 08 Oct 2012 22:41:46 +0200
ghc (7.6.1-1) experimental; urgency=low
* New upstream release
* New upstream release
Dropped patches, applied upstream:
+ Fix-GHCi-segfault-on-linux-powerpc
+ hurd-is-ELF
......@@ -461,7 +539,7 @@ ghc (7.6.1-1) experimental; urgency=low
+ fix-PPC-right-shift-bug
+ no-useless-time
+ fix-ppc-ghci-segfault
* Configure the use of llc-3.0 and opt-3.0 via ./configure
* Configure the use of llc-3.0 and opt-3.0 via ./configure
* Bump standards version
-- Joachim Breitner <nomeata@debian.org> Mon, 08 Oct 2012 15:48:21 +0200
......@@ -500,7 +578,7 @@ ghc (7.4.1-4) unstable; urgency=low
* debian/patches/no-useless-timer: Backported from GHC 7.4.2, (Closes:
#677096)
* Make sure GHC is using ld.bfd, as it passes arguments not understood by
the gold linker (Closes: #673081)
the gold linker (Closes: #673081)
* Use a saner priority for the runhaskell alternative. (Closes: #676970).
TODO for later: Consider removing the alternatives code altogether.
......@@ -2329,3 +2407,5 @@ ghc4 (4.03-1) unstable; urgency=low
* Initial Release.
-- Michael Weber <michael.weber@post.rwth-aachen.de> Sat, 26 Jun 1999 17:52:29 +0200
......@@ -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 )