This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
On Mon, May 25, 2009 at 08:46:19AM +1000, Ben Elliston wrote:
> On Mon, 2009-05-25 at 01:40 +0400, Valdimir Volynsky wrote:
>
> > Theoretically, it's possible to try -
> > execvp("as","--version >as.version"),
> > read file as.version and detect is it GNU AS or not. But I
> > am not sure, that all assemblers can support --version
> > option.
>
> It is quite unlikely that they do.
One thing to watch out for is if the user say -mtune=<foo> where foo is a new
machine that GCC knows about, but the user hasn't installed a newer assembler
that knows about machine <foo>. Since this is -mtune, no new instructions will
be generated, but the assembler might be an older assembler, and complain when
you set the tune option for an unknown machine.
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com