[PATCH] Cross-compilation document

Joey Gouly joey.gouly at arm.com
Wed Sep 4 05:03:27 PDT 2013



================
Comment at: docs/HowToCrossCompile.rst:9
@@ +8,3 @@
+This document contains information about building LLVM and
+Clang on your laptop, targeting another platform. It also contains
+an example when ``host/target`` is ``x86_64/ARM``.
----------------
Can you say "on your host machine" rather than "on your laptop".. it may not be a laptop you're using!

================
Comment at: docs/HowToCrossCompile.rst:34
@@ +33,3 @@
+target specific code. So you'll need special options to help Clang understand
+what target you're compiling to, where are your stuff, etc.
+
----------------
s/where are your stuff/where your tools are/

================
Comment at: docs/HowToCrossCompile.rst:37
@@ +36,3 @@
+Another problem is that compilers come with standard libraries only (like
+libgcc, libm, etc), so you'll have to find and let available to the build
+system every other library that you'll need to build your software,
----------------
s/let/make/

================
Comment at: docs/HowToCrossCompile.rst:43
@@ +42,3 @@
+Finally, not all toolchains are the same, and consequently, not every Clang
+option will make it work magically. Some options, like -sysroot (which
+effectively changes the logical root for headers and libraries), assume
----------------
Maybe remove the "make it".

================
Comment at: docs/HowToCrossCompile.rst:45
@@ +44,3 @@
+effectively changes the logical root for headers and libraries), assume
+all your binaries and libraries are in the same directory, which is not
+true when your cross-compiler was installed by the distribution's package
----------------
s/which is/which may/

================
Comment at: docs/HowToCrossCompile.rst:47
@@ +46,3 @@
+true when your cross-compiler was installed by the distribution's package
+management. So, for each specific case, you'll have to use more than one
+option, and in most cases, you'll end up setting include paths (-I) and
----------------
s/you'll have/you may/

================
Comment at: docs/HowToCrossCompile.rst:73
@@ +72,3 @@
+ * ``sub`` = for ARM: v5, v6m, v7a, v7m, etc
+ * ``sys`` = none, linux, darwin etc.
+ * ``abi`` = eabi, gnueabi, androideabi, gnueabihf, etc
----------------
Wouldn't hurt to mention Windows here?

================
Comment at: docs/HowToCrossCompile.rst:168
@@ +167,3 @@
+
+Also, finding the libraries to your target are not as easy
+as to your host machine. There aren't many cross-libraries available
----------------
s/to/for/

================
Comment at: docs/HowToCrossCompile.rst:169
@@ +168,3 @@
+Also, finding the libraries to your target are not as easy
+as to your host machine. There aren't many cross-libraries available
+as packages to most OSs, so you'll have to either cross-compile them
----------------
s/to/for/

================
Comment at: docs/HowToCrossCompile.rst:243
@@ +242,3 @@
+
+The TableGen options are required to compile it with the host compiler,
+and the CXX flags define the target, cpu (which defaults to fpu=VFP3
----------------
I don't think this is quite right. You pass it the path to a already-built-host TableGen binary right?
So you should probably mention you need to built it separately first.


http://llvm-reviews.chandlerc.com/D1584



More information about the cfe-commits mailing list