How to set my assembler?

Hi all.
clang(3.0, Linux) will set “as” in PATH as the default assembler, but I want to change this like using this option “-ccc-gcc-name” to change the default gcc. But as mentioned here there’s no “-ccc-gas-name” or “-ccc-as-name” to specify the assembler. So what I can do is to add “as” into PATH. Now I’m using clang to cross compile arm-target programs, and I must set arm-xxx-as to the default assembler. It is not nice to create a symbol link named “as” in PATH linked to arm-xxx-as which will overlap the default assember “/usr/bin/as”. So if any one can give a help?
clang invoked with follow options:

clang -ccc-host-triple arm-linux-gnueabi -ccc-gcc-name arm-unknown-linux-gnueabi-gcc -mfloat-abi=hard -c -v xxx.c
and which shows clang will invoke “as” in PATH

Thank you.

Just call it arm-linux-gnueabi-as.


OK. And I my system this is arm-unknown-linux-gnueabi-as, which determined by the prefix setting.

At least clang 3.1 (not sure about 3.0 from memory, might have gone into
the tree after that) will look for $triple-as and $triple-ld with the
normal Linux toolchain. So use the triple your binutils are built for
and should just work (TM).


clang 2.7 will find $triple-as and $triple-ld。。。but after upgrade to 3.0 it does not work. After 3.1 released, I will have a try. But I do think providing options to choose my assembler and linker is better, or just have more choices.
Thanks :slight_smile: