[cfe-dev] How can I make clang/llvm use specific toolchain?

Journeyer J. Joh oosaprogrammer at gmail.com
Mon Dec 24 18:01:33 PST 2012


Hello Leonid Borisenko,

>> Workaround: I was lucky enough to have cross-linker installed into
>> /usr/bin/arm-linux-gnueabi-ld. So I've passed following options to clang:
>>
>>   -target arm-linux-gnueabi -march=armv7-a -mthumb -mtune=cortex-a8
>>
>> As -target is defined, clang will try to find arm-linux-gnueabi-ld first and
>> it will be found. -march, -mthumb and -mtune options are overriding defaults
>> set after -target value.
>>
>> And 'sb2 clang ...' with these options invokes cross-linker.

- This means that you used cross-binutil to link ELFs. But (the
library and?) header files are of SB2?
- Did you execute clang under SB2 environment(context)? and used
cross-binutil out of SB2?

Thank you for your sharing of your knowledge.
The usage of the options above would be helpful.

Thank you very much!

Sincerely
Journeyer J. Joh

2012/12/25 Leonid Borisenko <leo.borisenko at gmail.com>:
> Workaround: I was lucky enough to have cross-linker installed into
> /usr/bin/arm-linux-gnueabi-ld. So I've passed following options to clang:
>
>   -target arm-linux-gnueabi -march=armv7-a -mthumb -mtune=cortex-a8
>
> As -target is defined, clang will try to find arm-linux-gnueabi-ld first and
> it will be found. -march, -mthumb and -mtune options are overriding defaults
> set after -target value.
>
> And 'sb2 clang ...' with these options invokes cross-linker.



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------



More information about the cfe-dev mailing list