Add -m{arch,tune}=local for x86/x86-64

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Wed Mar 15 11:10:00 GMT 2006


Michael Matz <matz@suse.de> writes:

> > > Isn't -march=native better than -march=local?
> > 
> > Yes, I agree.
> 
> Okay.

I like this too, but we might want to investigate what other compilers do
here: 

* Sun cc has -xarch=native and -xarch=native64:

          native    Set the parameters for the best performance
                    on the host environment. The compiler chooses
                    the appropriate setting for producing 32-bit
                    binaries for the system on which the proces-
                    sor is running.

          native64  Set the parameters for the best performance
                    on the 64-bit host environment. The compiler
                    chooses the appropriate setting for producing
                    64-bit binaries for the system on which the
                    processor is running.

  native64 seems like a very useful addition for bi-arch compilers like
  sparc/sparcv9 and i386/x86_64.

* Compaq/HP cc on Tru64 UNIX has -arch host:

      host
          Generate instructions for the processor that the compiler is run-
          ning on (for example, EV6 instructions on an EV6 processor).

  Might be an option as well, since unlike local or native it suggests that
  the host machine is used to determine which cpu to optimize for
  (although, as I said, I prefer native).

I don't have access to other systems, but maybe we can investigate and
learn from what is done there?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University



More information about the Gcc-patches mailing list