[LLVMdev] "clang -v" shows a GCC call
st at invia.fr
Wed Apr 28 02:43:56 PDT 2010
Török Edwin a écrit :
> On 04/27/2010 06:54 PM, Swiss Guy wrote:
>> Thanks for your really fast answer.
>> I understood that, but this means that the llvm+Clang suite is not able to
>> create a machine binary file without any intervention of GCC ?
>> I thought it could.
>> This means too that I must port GCC+Binutils in order to have a LLVM port
>> for my architecture ?
>> That sound like a huge work, I've chosen LLVM at the beginnig because I
>> thought it could avoid me porting GCC+Binutils.
> You can define your own toolchain in clang. I think FreeBSD does that.
> You need an assembler, a linker, and a way to call them.
> It doesn't necesarely have to be binutils assembler, but it must
> understand gas syntax (maybe clang -integrated-as can help here?).
You can also use LLVMC driver to easily define your own build flow.
see llvm/tools/llvmc/example/ directory and llvmc tutorial in llvm
(and don't mix up llvmc and llvm-mc that's different tools)
But you need your own assembler/linker and the easiest way to have this
is to port binutils. You don't have to port GCC, only binutils is required.
More information about the llvm-dev