Error building ghc on raspberry pi.

roconnor at theorem.ca roconnor at theorem.ca
Sun Jan 13 05:23:55 CET 2013


On Sat, 12 Jan 2013, Ben Gamari wrote:

> 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

You've written "-optc-mfloat-abi=hard -optc-mcpu=cortex-a9" twice in your 
GhcLibHcOpts.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''



More information about the Glasgow-haskell-users mailing list