Error building ghc on raspberry pi.

Ben Gamari bgamari.foss at
Tue Jan 15 18:25:11 CET 2013

roconnor at writes:

> Okay, I tried:
> SRC_HC_OPTS        = -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2
> GhcStage1HcOpts    = -O -fllvm
> GhcStage2HcOpts    = -O0 -fllvm
> GhcLibHcOpts       = -O -fllvm -optlc-float-abi=hard
> and I got the same error at a different build step.  I'm not sure if it is 
> earlier or later.
> It seems still not everything is using the hard-float ABI.
> ===--- building final phase
> make -r --no-print-directory -f phase=final all
>    HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses VFP register arguments, utils/hsc2hs/dist-install/build/Main.o does not
> /usr/bin/ld: failed to merge target specific data of file utils/hsc2hs/dist-install/build/Main.o

I found this as well and have been unable to figure out what in the
build system needs to be tweaked. This is ultimately where I gave up on

Anyone have any ideas what flags this is built with? It seems that
neither GhcStage2HcOpts nor GhcLibHcOpts make it to the compiler here,

    "inplace/bin/ghc-stage1"   -H64m -Rghc-timing -v    -hide-all-packages -i -iutils/hsc2hs/. -iutils/hsc2hs/dist-install/build -iutils/hsc2hs/dist-install/build/autogen -Iutils/hsc2hs/dist-install/build -Iutils/hsc2
    hs/dist-install/build/autogen     -optP-include -optPutils/hsc2hs/dist-install/build/autogen/cabal_macros.h -package base- -package containers- -package directory- -package process-  -X
    Haskell98 -XCPP -XForeignFunctionInterface  -no-user-package-conf -rtsopts     -odir utils/hsc2hs/dist-install/build -hidir utils/hsc2hs/dist-install/build -stubdir utils/hsc2hs/dist-install/build -hisuf hi -osuf 
     o -hcsuf hc -c utils/hsc2hs/./Main.hs -o utils/hsc2hs/dist-install/build/Main.o


 - Ben

More information about the Glasgow-haskell-users mailing list