[llvmlinux] Compile LLVM/Clang for ARM android

Anton Smirnov dev at antonsmirnov.name
Wed Oct 16 12:05:34 UTC 2013


Yes, i've started from this manual and i've tried few dozens of differene
build environments including 32/64 bit,
different OSs (max, linux) and different toolchains (standalone from ndk,
linaro, ubuntu arm toolchain packages).


2013/10/16 Thiago C. Santini <qpsantini at gmail.com>

> Anton,
>
> If you are trying to compile LLVM in your host (i.e. arm->arm), it seems
> there is some info here <http://llvm.org/docs/HowToBuildOnARM.html>.
> Else, if you are trying to cross-compile(i.e. x86->arm), check this one<http://llvm.org/docs/HowToCrossCompileLLVM.html>
> .
>
>
> On Wed, Oct 16, 2013 at 8:40 AM, Tinti <viniciustinti at gmail.com> wrote:
>
>> Hi Anton,
>>
>> I have never tried it but I would suggest you to take a look on Android
>> build system. You probably already know that Android builds a version of
>> LLVM to do some stuff.
>>
>> I don't know exactly what but Android is able to build LLVM for some
>> purpose. Then you would need to build Clang using this LLVM. This may be
>> the easy way.
>>
>> I hope it helps.
>>
>> Regards,
>> Tinti
>>
>>
>> On Wed, Oct 16, 2013 at 8:34 AM, Anton Smirnov <dev at antonsmirnov.name>wrote:
>>
>>> Hi, Tinti.
>>>
>>> I'm trying to compile llvm/clang to work on arm android (host) and
>>> compile for arm android (target).
>>> If you targeted to compile USING Clang, then i don't mind to compile
>>> Clang for ARM Android USING Clang on my build machine.
>>>
>>> I've asked for suggestions or any compilation guide in llvm mail-list
>>> but it seems that nobody did it before and there are A LOT of different
>>> problems there from not ready sources/configs to my small experience in
>>> native tools, toolchains, etc.
>>>
>>> So can anybody help to compile Clang for ARM Android?
>>>
>>> Regards, Anton.
>>>
>>>
>>>
>>> 2013/10/16 Tinti <viniciustinti at gmail.com>
>>>
>>>> Hi Anton,
>>>>
>>>> Are you trying to build LLVM/Clang for Android, I mean have the
>>>> toolchain inside Android or you are trying to build Android itself with
>>>> LLVM/Clang?
>>>>
>>>> The LLVMLinux project is more related to build Linux Kernel or Android
>>>> Kernel *with* LLVM/Clang and not to provide LLVM/Clang *for being used*
>>>> inside Linux or Android. If you are trying to build a toolchain for Android
>>>> I would recommend you to ask in LLVM maillist, other wise we have the
>>>> following quick starts:
>>>>
>>>> - http://llvm.linuxfoundation.org/index.php/Quick_Start_Guide
>>>> - http://llvm.linuxfoundation.org/index.php/Nexus_7
>>>>
>>>> Regards,
>>>> Tinti
>>>>
>>>>
>>>> On Wed, Oct 16, 2013 at 4:58 AM, Anton Smirnov <dev at antonsmirnov.name>wrote:
>>>>
>>>>> Hello.
>>>>>
>>>>> I've tried to compile the subject but no luck.
>>>>>
>>>>> My wrap-up for attempts:
>>>>> "* On mac linker does not support 'with-version' argument (i've asked
>>>>> for it and did not get any solution except DIY)
>>>>> * on linux 64 bit (VM) it's including "-L/lib64" to linker and it
>>>>> fails to link
>>>>> * compiled with armeabihf toolchain can't be  linked as ndk does not
>>>>> support linking with hard-float.
>>>>> * compiled with armeabi toolchain can't be loaded as it fails to find
>>>>> libdl.so.2.
>>>>> * compilation with standalone toolchain from android ndk fails because
>>>>> of futimes() and futimens() function not found.
>>>>>
>>>>> Last time i've found
>>>>> https://android.googlesource.com/platform/external/llvm/ repo (also
>>>>> externa/clang and external/compiler-rt)
>>>>> but they can't be compiled using standalone toolchain from ndk because
>>>>> of source code errors ("master" branch because of cast error, "jb-release"
>>>>> because of no getsid() function definition). This repo seems to be internal
>>>>> source code which can be not ready to be used for not android OS developer,
>>>>> so no wonder."
>>>>>
>>>>> Can somebody help me or is there step-by-step guide for this?
>>>>>
>>>>> Thanks,
>>>>> Anton.
>>>>>
>>>>> _______________________________________________
>>>>> LLVMLinux mailing list
>>>>> LLVMLinux at lists.linuxfoundation.org
>>>>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Simplicity is the ultimate sophistication
>>>>
>>>> _______________________________________________
>>>> LLVMLinux mailing list
>>>> LLVMLinux at lists.linuxfoundation.org
>>>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>>>>
>>>
>>>
>>> _______________________________________________
>>> LLVMLinux mailing list
>>> LLVMLinux at lists.linuxfoundation.org
>>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>>>
>>
>>
>>
>> --
>> Simplicity is the ultimate sophistication
>>
>> _______________________________________________
>> LLVMLinux mailing list
>> LLVMLinux at lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>>
>
>
>
> --
> Atenciosamente / Kind Regards
>
> Thiago Caberlon Santini
> Computer Engineer - Federal University of Rio Grande do Sul
>
> Website:   http://www.inf.ufrgs.br/~tcsantini/
> PGP-Key: http://www.inf.ufrgs.br/~tcsantini/tcsantini.asc
>
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20131016/05ccc676/attachment.html>


More information about the LLVMLinux mailing list