Changes to ghc(12)

Changes to ghc:
commit c9c0b1514b566425b16e2d88dd50f994c9a87709
Author: Austin Seipp <austin@well-typed.com>
Date:   Thu Feb 13 07:17:30 2014 -0600

    Fix #8770

    As usual, Mac OS X is extremely annoying (or the software is, anyway),
    because not only does it load dynamic libraries with the .dylib
    extension, but also the .so extension. For whatever reason. At least
    it's easy to fix.

    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit dc080915597065087b3821b3ded0a621a7e2fae7)

commit b8e2b649e18984028ba82f99786b640578f9709f
Author: Austin Seipp <austin@well-typed.com>
Date:   Sun Feb 16 19:14:36 2014 -0600

    Fix #8745 - GND is now -XSafe compatible.

    As discussed in the ticket, after the landing of #8773, GND is now
    -XSafe compatible.

    This fixes the test fallout as well. In particular SafeLang07 was
    removed following in the steps of SafeLang06, since it no longer failed
    from GND, but failed due to roles and was thus invalid.

    The other tests were tweaked to use TemplateHaskell instead of GND in
    order to trigger safety warnings.

    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit a8a01e742434df11b830ab99af12d9045dfcbc4b)

commit f321edd759841d5328a9d4fee7f291e21446acc1
Author: Austin Seipp <austin@well-typed.com>
Date:   Sun Feb 16 18:49:43 2014 -0600

    Fix check for TLS support in Storage.c

    This should have manifested earlier, but for some reason it only seemed
    to trigger on Mavericks.

    Signed-off-by: Austin Seipp <austin@well-typed.com>

    (cherry picked from commit c83eabf37b884398d911609e46707df771c3fde9)

commit a3e3afc73dfef7bfc038b88904f04b0fb4fec729
Author: Austin Seipp <austin@well-typed.com>
Date:   Thu Feb 13 07:19:39 2014 -0600

    Fix installation of hpc (#8735)

    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit a365eabd465a1700f479f78ad99fc1a31915e639)

commit dfe466a256f065987e0e4b7d3693369fe6ad0e3f
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:29:50 2014 -0600

    mk/config.mk.in: lower -O2 optimization down to -O1 on UNREG

    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').

    Issue #8748

    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 2d5372cfdc2236a77ec49df249f3379b93224e06)

commit 0c7ede86c5bf66de2223c647cec3c5ee15bcb715
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:29:14 2014 -0600

    rts/package.conf.in: fix UNREG on --with-system-libffi when include-dir is passed explicitely

    Issue #8748

    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 2d0fa9aee78e5bfffb9a4580954825025a651be5)

commit 2a81c08b2d867157be6f7f98948c893de594f384
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:27:46 2014 -0600

    includes/Stg.h: add declarations for hs_popcnt and frinds

    This fixes most of implicit function declarations emitted
    C codegen in UNREG mode. Found by adding the following to
    mk/build.mk:

        SRC_CC_OPTS += -Werror=implicit-function-declaration
        SRC_HC_OPTS += -optc-Werror=implicit-function-declaration

    Issue #8748

    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 858a807d5522145e8ede9148a15bb65a0d851c00)

commit 645d1ec0a67a05aae75cc4d53e1fbc9664481589
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:26:05 2014 -0600

    rts/Capability.c: fix crash in -threaded mode on UNREG build

    UNREG mode has quite nasty invariant to maintain:
        capabilities[0] == &MainCapability

    and it's a non-heap memory, while other
    capabilities are dynamically allocated.

    Issue #8748

    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit ebace6969f0ec85b1caa0fea265a5f9990a23b2e)

commit ce3cb705eabd73981ed33d7b39d30399dd216ec0
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:23:48 2014 -0600

    Fix --enable-unregistered by declaring missing RTS functions (#8748)

    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 4bb50ed0c6246e2d45e22e79f5658db1fa8a58b3)

commit 2243e007a3c3e0b12aaf47541571a351da855022
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Thu Feb 13 07:23:02 2014 -0600

    Fix --enable-unregistered by passing NOSMP to .hc compiler (#8748)

    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 68f0a6a6cd5bf3374fbc4a4fb09df4cbda97b61c)

commit 00df3185f2d8b8ba6320ef1621c29e7ddfada911
Author: Richard Eisenberg <eir@cis.upenn.edu>
Date:   Thu Feb 13 14:22:20 2014 -0500

    Fix #8773.

    To make a role annotation on a class asserting a role other than
    nominal, you now need -XIncoherentInstances. See the ticket for
    more information as to why this is a good idea.

    (cherry picked from commit 138297585f88351352e0ed878b25f26e1d6edfef)

commit 92b4219f254be97d33d4e1768ba17c966cbd3a8d
Author: Richard Eisenberg <eir@cis.upenn.edu>
Date:   Thu Feb 13 13:35:40 2014 -0500

    Fix #5682. Now, '(:) parses.

    (cherry picked from commit 473f12a3be27a00b035f1fdc7050a0ff31bf12ff)