LLVM Cross-Compiler: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Add in progress status to this article
m Added information on sysroots and flags for x86 compilation
Line 106:
<source lang="bash">
-target armv7--eabi -mcpu=cortex-a9
</source>
An example for compiling to a generic X86 ELF target would be:
<source lang="bash">
--target=i686-pc-none-elf -march=i686
</source>
 
Line 120 ⟶ 124:
==== -nostdinc++ ====
Makes sure the standard C++ library headers are not included. This makes sense if you build a custom version of libc++ and want to avoid including system one.
 
== Using system roots ==
Due to Clang's dependency on ld, you may get the error message "/usr/bin/ld: this linker was not configured to use sysroots". If you receive this error, you'll probably have to compile binutils with sysroot support. There is information how to do this [[GCC Cross-Compiler#Binutils]] - note the "--with-sysroot" flag.
 
== TODO ==