Subject: Re: Performance?
To: None <netb@yuba.kcn.ne.jp>
From: Johan A.van Zanten <johan@giantfoo.org>
List: port-sparc
Date: 10/23/2004 18:00:55
> On Thu, Oct 21, 2004 at 01:17:21PM -0500, Johan A.van Zanten wrote:
> > you built Apache, Mysql and PHP that the binaries are not optimized for
> > your SPARC 5, which is a "sun4m" machine (V8 of the SPARC CPU
> > architecture). Instead, by default they were probably built to run on any
> > SPARC machine, which includes the older sun4c (SPARC V7) machines, like a
> > SPARC 1, 1+, or 2 (and many others).
> > 
> >  If you didn't do so previously, calling gcc like this:
> > 
> > gcc -mcpu=v8 -mtune=supersparc
> 

Henry Nelson <netb@yuba.kcn.ne.jp> wrote:
> May I assume this is good for the SPARCclassic, which is also sun4m?

Yep, those can be used with the SPARCclassic.  If you have a sun4m machine
that has the HyperSPARC CPUs (sometimes found in the SPARC-10 or SPARC-20,
but not always), and you wanted to generate code specific to the
HyperSAPRC CPU, you would do:

 -mtune=hypersparc


> Actually, I build almost everything from the tarballs.  In general do
> these architecture optimizations go into CFLAGS, or should I define CC
> with the options included?  (Or, even more drastic, should I be building
> gcc somehow so that it uses these optimizations by default?)

I would put them in CFLAGS.


 -johan