Changes to ghc(6)

Changes to ghc:
commit 5944331dfcbd703f6a1a249406a2f4476749a6e1
Author: Herbert Valerio Riedel <hvr@gnu.org>
Date:   Mon Apr 21 16:55:11 2014 +0200

    Kill whitespace after cpp's `-I` flag

    This clean-up is in a similiar spirit as 574ef4293b8676.

    Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
    (cherry picked from commit 4ab8fc55eb6119dbba2f487c5a01d30a7c6ae113)

commit 930a2ef1066bad478fe36e4963c35b89b30e58e7
Author: Austin Seipp <austin@well-typed.com>
Date:   Mon Apr 21 07:22:50 2014 -0500

    ghc: Do not add a space in '-U __PIC__'

    GHC previously introduced a space here. However, this can in some cases
    be interpreted as "-U __PIC__" - note that in shell, the -U would still
    be recognized with an argument, but the argument would be " __PIC__",
    with a space in front, as opposed to the single string '__PIC__'.

    In practice most tools seem to handle this OK. But the Coverity Scan
    analysis tool does not: it errors on the fact that ' __PIC__' is an
    invalid CPP name to undefine.

    With this, it seems the Coverity analysis tool can easily analyze the
    entire GHC build.

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

commit 8f71836581f9abc1d03246193cb4cea4d52e63e9
Author: Colin Watson <cjwatson@debian.org>
Date:   Sat Apr 12 02:13:48 2014 +0100

    Add the powerpc64le architecture

    This is ArchUnknown for now, as it requires some porting work over and
    above powerpc64 due to such things as the different function calling
    sequence in the ELFv2 ABI.  For now, an unregisterised port is better
    than nothing.

    Signed-off-by: Colin Watson <cjwatson@debian.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 8586f600613a6a99fee8fe707b00adab1a340641)

commit 06979d2a437c59a959472e60c53873a575bcdda8
Author: Colin Watson <cjwatson@debian.org>
Date:   Sat Apr 12 01:55:07 2014 +0100

    Be less untruthful about the prototypes of external functions

    GHC's generated C code uses dummy prototypes for foreign imports.  At the
    moment these all claim to be (void), i.e. functions of zero arguments.  On
    most platforms this doesn't matter very much: calls to these functions put
    the parameters in the usual places anyway, and (with the exception of
    varargs) things just work.

    However, the ELFv2 ABI on ppc64 optimises stack allocation
    (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html): a call to a
    function that has a prototype, is not varargs, and receives all parameters
    in registers rather than on the stack does not require the caller to
    allocate an argument save area.  The incorrect prototypes cause GCC to
    believe that all functions declared this way can be called without an
    argument save area, but if the callee has sufficiently many arguments then
    it will expect that area to be present, and will thus corrupt the caller's
    stack.  This happens in particular with calls to runInteractiveProcess in
    libraries/process/cbits/runProcess.c.

    The simplest fix appears to be to declare these external functions with an
    unspecified argument list rather than a void argument list.  This is no
    worse for platforms that don't care either way, and allows a successful
    bootstrap of GHC 7.8 on little-endian Linux ppc64 (which uses the ELFv2
    ABI).

    Fixes #8965

    Signed-off-by: Colin Watson <cjwatson@debian.org>
    Signed-off-by: Austin Seipp <austin@well-typed.com>
    (cherry picked from commit 5a31f231eebfb8140f9b519b166094d9d4fc2d79)

commit e2e6d122e1c7f6cdcf2483379bfa7c5acb1022a1
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Mon Apr 7 15:22:11 2014 +0100

    Small issue with signatures in a TH splice (fixes Trac #8932)

    (cherry picked from commit d8d798b1b33ab0593ed03f193360b8725ba2c2ba)

    Conflicts:
    	testsuite/tests/th/all.T

commit 15089e8729297978ee3c0936953e4dfac59ea274
Author: Edward Z. Yang <ezyang@cs.stanford.edu>
Date:   Thu Apr 10 18:28:11 2014 -0700

    Fix #8641, creating directories when we have stubs.

    Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
    (cherry picked from commit c7498bbdaa74dadd976c75c4e303c2050aa78277)