[llvmlinux] cross-compiling llvm/clang for android

Anton Smirnov dev at antonsmirnov.name
Thu Sep 26 06:46:34 UTC 2013


First i will describe my problem in original llvm/clang and probably it's
solved in llvm linux project.

I'm trying to cross-compile clang to run on Android devices (both arm and
x86).
I've read "getting started" <http://llvm.org/docs/GettingStarted.html>
(including
cross-compilation section) and all the websites about clang
cross-compilation that i was able to find.

So i'm pretty sure it's bug.

i've followed all the steps to checkout the sources and started to compile
it according to my aim:

../llvm/configure --prefix=/softdev/clang/arm --host=arm-linux-androideabi
--with-float=hard --with-fpu=neon --enable-optimized --enable-targets=arm

then i'm getting make error:

ld: unknown option:
--version-script=/Users/asmirnov/Documents/dev/src/llvm/autoconf/ExportMap.map
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: ***
[/Users/asmirnov/Documents/dev/src/llvm_build/Release+Asserts/bin/FileCheck]
Error 1
make[1]: *** [FileCheck/.makeall] Error 2
make: *** [all] Error 1

the problem is that macosx ld does not support "--version-script" parameter.
this seems to relate to cross-compilation only as compilation for host
system lasts much longer and i believe it's okay.

After it i've found your project llvm linux.

What can be done? Is there any ready solution or walk-around in llvm linux?
Thanks in advance and regards, Anton.

PS. It's for free project ArduinoDroid:
https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinodroid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20130926/a0eba876/attachment.html>


More information about the LLVMLinux mailing list