Bug#782868: GHC calling convention incorrect

Erik de Castro Lopo erikd at mega-nerd.com
Sun Apr 19 02:36:23 UTC 2015


Source: llvm-toolchain-3.5
Version: 1:3.5-10
Severity: normal
Tags: patch

LLVM implements a special calling convention which is used exclusively
by the Glasgow Haskell Compiler (GHC). The llvm-3.5.0 release had a bug
in the GHC calling convention for Arm resulting in Haskell programs
compiled for arm would segfault on being run. See the GHC bug tracker:

    https://ghc.haskell.org/trac/ghc/ticket/9920
    
Release 7.10 of GHC can *only* use the llvm-3.5, but version 3.5.0 has
this bug while 3.5.1 and later do not.

The patch in the above GHC trac ticket applied to the 3.5.0 tree fixes 
this. I have also taken the llvm-toolchain-3.5 debian sources, add the
above patch to the debian/patches/ directory (and updated the series
file) and built it. Unfortunately I can build this package to completion
because of an FTBFS bug (#782860) but the build proceeds far enough for
me to grab the file `build-llvm/Release/bin/llc` to test it and it works
fine.

I will attach the require patch to the ticket.

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable'), (500, 'testing-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, arm64

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_AU.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-lower-tail-calls.patch
Type: text/x-diff
Size: 6907 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20150419/8fa1771e/attachment.patch>


More information about the Pkg-llvm-team mailing list