Errors building GHC on iOS with LLVM >= 3.4

Ben Gamari bgamari.foss at gmail.com
Sun Oct 5 02:32:30 UTC 2014


Murray Campbell <murray at sonology.net> writes:

> Hi,
>
> I am trying to help solve #9125 in which an ARM build creates binaries
> that mangle Float values.
>
> After a great deal of help from rwbarton (detailed in the comments) it
> would appear that the problem is actually in LLVM 3.0. (v3.0 is
> virtually insisted upon in the iOS build instructions)
>
> Building GHC 7.8.3 for the iOS simulator with LLVM 3.4 produces a
> compiler that creates well behaved binaries.
>
> Unfortunately, building the device version fails with several warnings
> along the lines of:
>
>     /var/folders/02/0mv6cz6505x2xhzlr279k2340000gp/T/ghc5244_0/ghc5244_6-armv7s.s:2944:2:
>          warning: deprecated since v7, use 'dmb'
>                 mcr     p15, #0, r7, c7, c10, #5
>
> and:
>
>     libraries/ghc-prim/cbits/popcnt.c:76:38:
>          warning: shift count >= width of type [-Wshift-count-overflow]
>               popcount_tab[(unsigned char)(x >> 32)] +
>                                              ^  ~~
This is a case of an #ifdef being inappropriately x86 specific. The
32-bit popcnt implementation should be used on ARM yet the #ifdef looks
at i386_HOST_ARCH.

> before bailing with
>
>     /var/folders/02/0mv6cz6505x2xhzlr279k2340000gp/T/ghc6860_0/ghc6860_6-armv7.s:3916:2:
>          error: out of range pc-relative fixup value
>                 vldr    d8, LCPI70_0
>                 ^
>
>     /var/folders/02/0mv6cz6505x2xhzlr279k2340000gp/T/ghc6860_0/ghc6860_6-armv7s.s:3916:2:
>          error: out of range pc-relative fixup value
>                 vldr    d8, LCPI70_0
>                 ^
>
> Next I tried to build HEAD (plus phabricator D208) with LLVM 3.4 but
> got the same error.
>
I've never seen an error of this form. What symbol definitions does this
error occur in?

> Various adventures with LLVM 3.5 ended with the same error.
>
Be aware that LLVM 3.5 will require D155 due to changes in where LLVM
aliases are accepted.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141004/3c9f39dd/attachment.sig>


More information about the ghc-devs mailing list