Error building ghc on raspberry pi.
Ben Gamari
bgamari.foss at gmail.com
Sun Jan 13 05:21:15 CET 2013
roconnor at theorem.ca writes:
> What version of GHC did you build?
>
This was building from the ghc-7.4 branch. That being said, after this
build finished I noticed that the resulting stage 2 compiler wasn't
invoking llc with the correct parameters, resulting in the same linker
error when doing builds.
This might have been due to the fact that I changed `build.mk` several
times mid-build. I'm currently waiting for a clean rebuild. However, I'm
now using a more specific configuration as passing `-optlc-float-abi=hard`
in `HC_SRC_OPTS` caused the stage 0 build to fail with,
...
*** LLVM Compiler:
'llc-3.0' '-O1' '-relocation-model=static' '/tmp/ghc25792_0/ghc25792_0.bc' '-o' '/tmp/ghc25792_0/ghc25792_0.lm_s' '-float-abi=hard' '-mcpu=cortex-a9' '-mattr=+v7,+vfp3,+d16' '-float-abi=hard'
llc-3.0: for the -float-abi option: may only occur zero or one times!
I'm not really sure where this second `-float-abi=hard` is coming from,
but using the following in `build.mk` works around the issue,
SRC_HC_OPTS = -H64m -Rghc-timing
GhcStage1HcOpts = -O -fvia-C
GhcStage2HcOpts = -O0 -fllvm -keep-llvm-files -debug -DDEBUG -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 -optlc-float-abi=hard -optlc-mcpu=cortex-a9
GhcLibHcOpts = -O -fllvm -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 -optlc-float-abi=hard -optlc-mcpu=cortex-a9
The build is still in stage 1 so it is unclear whether this will fix the
original linker error.
Cheers,
- Ben
More information about the Glasgow-haskell-users
mailing list