Changes between Version 7 and Version 8 of Building/CrossCompiling


Ignore:
Timestamp:
Jan 18, 2013 4:02:42 PM (15 months ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/CrossCompiling

    v7 v8  
    7272== Configuring the build == 
    7373 
    74 To configure the build: 
     74The C cross-compiler and tools are usually installed with the platform name as a prefix, e.g. if the target platform is `arm-linux-gnueabihf` then the gcc cross-compiler is named `arm-linux-gnueabihf-gcc`.  If your cross-compiling toolset is set up like this, then add the directory containing the tools to your `PATH`, and just say: 
     75 
     76{{{ 
     77./configure --target=<target> 
     78}}} 
     79 
     80and `configure` will find all the tools, using `<target>` as the prefix. 
     81 
     82If you need to specify the tools explicitly, then you can say 
    7583 
    7684{{{ 
     
    7886}}} 
    7987 
    80 Note: if you are cross-compiling for a platform that doesn't have a native code generator or registerised LLVM support, then you should add 
     88Note: if you are cross-compiling for a platform that doesn't have a native code generator or registerised LLVM support, then you should also add 
    8189 
    8290{{{ 
     
    106114You can do this even without installing your cross-compiler, just use `$TOP/inplace/bin/ghc-stage1` as `<cross-ghc>`. 
    107115 
    108 (the `--with-ld` option shouldn't really be required, hopefully this will get fixed at some point). 
     116NB. you should ensure that the cross-compiled packages won't conflict with your native packages; one way to do this is to modify your `$HOME/.cabal/config` to include the platform in the installation directory for packages: 
     117 
     118{{{ 
     119install-dirs user 
     120  libsubdir: $arch-$os/$pkgid/$compiler 
     121}}} 
     122