This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MIPS][LS2][5/5] Support for native MIPS GCC


Maxim Kuvyrkov <maxim@codesourcery.com> writes:
> This patch adds support for -march=native and -mtune=native options.
>
> File driver-st.c contains a routine that checks "cpu model" line in 
> /proc/cpuinfo and appends a proper option to compiler command line.
>
> This patch also specifies layout for Loongson multilibs.

OK, the obvious question here is: should the -march=native support
be specific to mips*-st*-linux* configurations, or should it apply
to all mips*-linux* configurations?  I can imagine you discussed
this internally; if you did, why settle on the former?

My gut feeling was that -march=native ought to be supported for all
mips*-linux* configurations, and that mips*-st*-linux* ought simply to
specify a particular selection of multilibs (and associated multilib
layout).  Thus driver-st.c would be called something more generic and
would be included by config/mips/linux.h.  We could then add other
names to the list as the need arises.

I think it would be worth adding a comment saying that, if we can't
detect a known processor, we simply discard the -march or -mtune option.
This is in contrast to x86, where we force a lowest common demoninator.
(For the record, I agree the behaviour you've got makes sense.)

You need to document the new option.

The implementation itself looks fine, thanks.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]