Changes between Version 1 and Version 2 of Building/Preparation/RaspberryPi


Ignore:
Timestamp:
Jan 25, 2013 4:55:12 PM (18 months ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/Preparation/RaspberryPi

    v1 v2  
    2020}}} 
    2121 
    22 (!ToDo: registerised, I haven't tested this yet). 
     22You can also build registerised: leave out the `--enable-unregisterised` option, but then you '''must''' use LLVM (see below). 
    2323 
    2424You'll need to use `integer-simple`, because the cross-compilation environment doesn't include GMP (see [wiki:Building/CrossCompiling]). 
    2525 
    26 The build with use the C backend by default. To use LLVM, add these to your `mk/build.mk`: 
     26The build should go successfully all the way to stage 2.  You can then use the stage 1 compiler on the host as a cross-compiler. 
     27 
     28== Using LLVM == 
     29 
     30 * When unregisterised, the C backend will be used by default, but you can optionally use LLVM.  Code generated using LLVM is compatible with code generated using the C backend. 
     31 * When registerised, you ''must'' use LLVM.  The `-fllvm` option is unnecessary in this case. 
     32 
     33To use LLVM, add these to your `mk/build.mk`: 
    2734 
    2835{{{ 
     
    3138}}} 
    3239 
    33 The build should go successfully all the way to stage 2.  You can then use the stage 1 compiler on the host as a cross-compiler. 
     40Note that LLVM 2.9 does not work for registerised code generation on ARM (it crashes), and LLVM 3.1 has been reported to generate incorrect code.  Success has been reported with LLVM 3.0 and 3.2. 
     41 
     42Unfortunately at the moment these options do not persist in GHC, so you have to give them when compiling application code too.