Micah Villmow | 6f6ea93 | 2012-09-27 22:14:10 +0000 | [diff] [blame] | 1 | =================================================================== |
| 2 | How To Build On ARM |
| 3 | =================================================================== |
| 4 | |
Micah Villmow | 6f6ea93 | 2012-09-27 22:14:10 +0000 | [diff] [blame] | 5 | Introduction |
| 6 | ============ |
| 7 | |
| 8 | This document contains information about building/testing LLVM and |
| 9 | Clang on ARM. |
| 10 | |
| 11 | Notes On Building LLVM/Clang on ARM |
| 12 | ===================================== |
| 13 | Here are some notes on building/testing LLVM/Clang on ARM. Note that |
| 14 | ARM encompasses a wide variety of CPUs; this advice is primarily based |
| 15 | on the ARMv6 and ARMv7 architectures and may be inapplicable to older chips. |
| 16 | |
| 17 | #. If you are building LLVM/Clang on an ARM board with 1G of memory or less, |
| 18 | please use ``gold`` rather then GNU ``ld``. |
| 19 | Building LLVM/Clang with ``--enable-optimized`` |
| 20 | is prefered since it consumes less memory. Otherwise, the building |
| 21 | process will very likely fail due to insufficient memory. In any |
| 22 | case it is probably a good idea to set up a swap partition. |
| 23 | |
| 24 | #. If you want to run ``make |
| 25 | check-all`` after building LLVM/Clang, to avoid false alarms (eg, ARCMT |
David Tweed | 6f20194 | 2012-10-26 12:09:47 +0000 | [diff] [blame] | 26 | failure) please use at least the following configuration: |
Micah Villmow | 6f6ea93 | 2012-09-27 22:14:10 +0000 | [diff] [blame] | 27 | |
| 28 | .. code-block:: bash |
| 29 | |
David Tweed | 6f20194 | 2012-10-26 12:09:47 +0000 | [diff] [blame] | 30 | $ ../$LLVM_SRC_DIR/configure --with-abi=aapcs-vfp |
| 31 | |
| 32 | #. The most popular linaro/ubuntu OS's for ARM boards, eg, the |
| 33 | Pandaboard, have become hard-float platforms. The following set |
| 34 | of configuration options appears to be a good choice for this |
| 35 | platform: |
| 36 | |
| 37 | .. code-block:: bash |
| 38 | |
| 39 | ./configure --build=armv7l-unknown-linux-gnueabihf |
| 40 | --host=armv7l-unknown-linux-gnueabihf |
| 41 | --target=armv7l-unknown-linux-gnueabihf --with-cpu=cortex-a9 |
| 42 | --with-float=hard --with-abi=aapcs-vfp --with-fpu=neon |
| 43 | --enable-targets=arm --disable-optimized --enable-assertions |