[cfe-dev] ccc-gcc-name equivalent to call as and ld directly
James Molloy
james.molloy at arm.com
Mon Jun 20 07:07:06 PDT 2011
Hi,
This comes back to the same as a previous conversation:
http://article.gmane.org/gmane.comp.compilers.clang.devel/15299
Reliance on GCC to point the way to the correct assembler and linker makes
sense for Linux because of its heavily GCC-centric view of the world, but
seems more of a hindrance for cross-compilation development, both baremetal
and cross-OS.
I believe that Renato is incorrect in the behaviour he noted - Clang sets
the host triple based on the exec prefix, and will pull out the OS part so
use the FreeBSD Toolchain class instead of the GCC-oriented "Unknown" class.
Not only this but the default behaviour in not just the FreeBSD toolchain
but any other is to look for the bare tool name "as"/"ld" instead of first
trying a triple-prefixed version ("arm-none-freebsd-as").
Cheers,
James
> -----Original Message-----
> From: rengolin at gmail.com [mailto:rengolin at gmail.com] On Behalf Of
> Renato Golin
> Sent: 20 June 2011 14:58
> To: Damjan Marion
> Cc: cfe-dev at cs.uiuc.edu; James Molloy
> Subject: Re: [cfe-dev] ccc-gcc-name equivalent to call as and ld
> directly
>
> On 17 June 2011 15:05, Damjan Marion <damjan.marion at gmail.com> wrote:
> > I wonder about possibility to introduce similar cmd line parameters
> (i.e. -ccc-gas-name and -ccc-ld-name ) to specify cross-assembler and
> cross-linker directly.
> >
> > This will also avoid need for having gcc in toolchain.
>
> Hi Damjan,
>
> I'm not sure, but I believe that if you call clang as
> "arm-none-freebsd-clang" (via symlink), it'll set the target triple
> automatically and should default to looking for "arm-none-freebsd-as"
> and so on.
>
> If it doesn't do that yet, it should. James might know more about it,
> as he was fiddling with that recently.
>
> Regarding the parameters, I don't object having them. It makes it
> easier to build automated tests where you want to change the
> assemblers and linkers at will.
>
> cheers,
> --renato
More information about the cfe-dev
mailing list