[llvmlinux] cross-compiling llvm/clang for android

Charlebois, Mark mcharleb at quicinc.com
Thu Sep 26 15:44:52 UTC 2013

Hi Anton,

We do not currently build clang to run on anything but the host used to build it. We do however build the ARM, i686 and x86_64 backends for clang for code generation.

I have not tried to build clang for ARM or clang for Android. I do not think the work done so far in the LLVMLinux project will help you.



From: llvmlinux-bounces at lists.linuxfoundation.org [mailto:llvmlinux-bounces at lists.linuxfoundation.org] On Behalf Of Anton Smirnov
Sent: Wednesday, September 25, 2013 11:47 PM
To: llvmlinux at lists.linuxfoundation.org
Subject: [llvmlinux] cross-compiling llvm/clang for android

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/577d8cbe/attachment.html>

More information about the LLVMLinux mailing list