This is the mail archive of the
mailing list for the GCC project.
Re: Passing options down to assembler and linker
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 23 Apr 2010 11:09:04 -0700
- Subject: Re: Passing options down to assembler and linker
- References: <firstname.lastname@example.org>
On Fri, Apr 23, 2010 at 01:55:48PM -0400, Jean Christophe Beyler wrote:
> I know we can pass -Wl,option, -Wa,option from gcc down to as and ld
> however if I have to write :
> gcc -mArch2 -Wl,--arch2 -Wa,--arch2 hello.c
> it gets a bit redundant, I must be blind because I can't seem to find
> how to do it internally.
You want to get comfortable with specs:
and building in what specs should be handled by default:
The ones you're interested in are ASM_SPEC and LINK_SPEC.