GHC 7.8 RC2: ARM cross compiler (LLVM Error)

Luke Clifton ltclifton at
Wed Mar 5 05:18:01 UTC 2014


I successfully compiled a native GHC 7.8 RC2 from the source distribution.

I now want to create an GHC cross compiler targeting ARM. So I do a

 ./configure --target=arm-linux-gnueabi --with-gcc=arm-linux-gnueabi-gcc

(I don't know why I have to explicitly supply the GCC, documentation seems
to suggest that it would pick that up based on target, which it seems to do
for ld.)

I then make a copy of the mk/ and place it at mk/ and
uncomment the BuildFlavour = quick-cross line.

At this point I run make and it goes along happily until...

 "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H64m -O0
 -package-name haskeline- -hide-all-packages -i
-ilibraries/haskeline/. -ilibraries/haskeline/dist-install/build
-Ilibraries/haskeline/includes   -optP-DUSE_GHC_ENCODINGS -optP-DTERMINFO
-optPlibraries/haskeline/dist-install/build/autogen/cabal_macros.h -package
base- -package bytestring- -package containers-
-package directory- -package filepath- -package
terminfo- -package transformers- -package unix- -Wall
-XHaskell98 -XForeignFunctionInterface -XRank2Types -XFlexibleInstances
-XTypeSynonymInstances -XFlexibleContexts -XExistentialQuantification
-XScopedTypeVariables -XGeneralizedNewtypeDeriving -XMultiParamTypeClasses
-XOverlappingInstances -XUndecidableInstances -XCPP -XDeriveDataTypeable
-XPatternGuards -O -fllvm  -no-user-package-db -rtsopts      -odir
libraries/haskeline/dist-install/build -hidir
libraries/haskeline/dist-install/build -stubdir
libraries/haskeline/dist-install/build   -c
libraries/haskeline/./System/Console/Haskeline/Command/History.hs -o
 LLVM ERROR: .Lbase_GHCziChar_chr2_info$alias: Target doesn't support
aliases to declarations
 libraries/haskeline/ recipe for target
 make[1]: ***
Error 1
 Makefile:64: recipe for target 'all' failed
 make: *** [all] Error 2

Here is my setup.

 - The Glorious Glasgow Haskell Compilation System, version
 - arm-linux-gnueabi-gcc (GCC) 4.7.3
 - LLVM 3.4

Is this me being silly, or is it a real problem? If it is a real problem
then I can file a ticket.

If there is anything I can do to help try and get GHC cross compiling for
ARM I would gladly do what I can.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list