Changes between Version 2 and Version 3 of Building/Preparation/RaspberryPi
- Timestamp:
- 01/30/13 02:03:43 (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Building/Preparation/RaspberryPi
v2 v3 20 20 }}} 21 21 22 You can also build registerised: leave out the `--enable-unregisterised` option, but then you '''must''' use LLVM (see below).22 You can also build registerised: leave out the `--enable-unregisterised` option, but then you '''must''' install a suitable LLVM (see below). 23 23 24 24 You'll need to use `integer-simple`, because the cross-compilation environment doesn't include GMP (see [wiki:Building/CrossCompiling]). … … 28 28 == Using LLVM == 29 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. 30 Note 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. 32 31 33 To use LLVM, add these to your `mk/build.mk`: 32 * When '''unregisterised''', the C backend will be used by default, but you can optionally use LLVM (see below). Code generated using LLVM is compatible with code generated using the C backend. 33 * When '''registerised''', LLVM is the only backend that supports registerised compilation on ARM, so it will be used automatically. You don't have to do anything except ensure that a suitable version of LLVM is installed. 34 35 To use LLVM when unregisterised, add these to your `mk/build.mk`: 34 36 35 37 {{{ 36 GhcLibHcOpts = -O -fllvm -optlc -mtriple=arm-linux-gnueabihf -optlc -mattr=+vfp2 -optlc -float-abi=hard37 GhcRtsHcOpts += -fllvm -optlc -mtriple=arm-linux-gnueabihf -optlc -mattr=+vfp2 -optlc -float-abi=hard38 GhcLibHcOpts = -O -fllvm 39 GhcRtsHcOpts += -fllvm 38 40 }}} 39 40 Note 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 42 Unfortunately at the moment these options do not persist in GHC, so you have to give them when compiling application code too.
