Changes between Version 12 and Version 13 of Building/CrossCompiling


Ignore:
Timestamp:
Jan 30, 2013 11:46:28 PM (2 years ago)
Author:
StephenBlackheath
Comment:

Add comments on llvm, aclocal.m4 and an ARM-specific note at the bottom.

Legend:

Unmodified
Added
Removed
Modified
  • Building/CrossCompiling

    v12 v13  
    6666(basically gcc + binutils + libc).  These need to be installed somewhere different from your native gcc & binutils so they don't conflict.  We assume that your `gcc` knows where its libraries live, otherwise you will probably need to add more flags to your `build.mk` settings to tell it.
    6767
    68 (!ToDo: what if we're using LLVM?)
     68If you are using LLVM as your compiler back end, you will need to make sure the llc and opt executables are in your search path. No other configuration is necessary. Also see the ARM-specific note below.
    6969
    7070Also install the other tools needed to build GHC on your platform: see [wiki:Building/Preparation].
     
    101101
    102102(the build system will probably do this automatically for you anyway, but it doesn't hurt to be explicit)
     103
     104Your target triplet must have the general form {{{<arch>-<os>-<abi>}}} or {{{<arch>-<vendor>-<os>-<abi>}}}. If configure complains that your arch, vendor or OS is unknown, then you will need to modify the checkArch(), checkVendor() or checkOS() function in '''aclocal.m4''', then get autotools to re-create the configure script using the '''autoreconf''' command.
    103105
    104106== `build.mk` settings ==
     
    140142
    141143Unfortunately this '''does not work''' at the moment, because `cabal` uses the wrong values for `$arch` and `$os`, see [https://github.com/haskell/cabal/issues/1184].
     144
     145== CPU/platform specific notes ==
     146
     147=== ARM ===
     148
     149Only llvm versions == 3.0 and >= 3.2 support GHC for ARM targets. There was a regression in llvm version 3.1, the result of which is bad generated code that crashes.