This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Default Solaris 2/x86 to -xarch/-xtune=pentium4
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Apr 2010 07:52:07 -0700
- Subject: Re: Default Solaris 2/x86 to -xarch/-xtune=pentium4
- References: <yddmxxoohr6.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On Wed, Mar 31, 2010 at 4:25 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> While config.guess still detects Solaris 2/x86 as i386-pc-solaris2.*, it
> seems to make sense to default -xarch/-xtune to pentium4, as is done on
> most other i386 targets. ?The following patch implements this. ?It only
> sets with_arch_32 since setting with_arch breaks the bi-arch
> i386-pc-solaris2.1[0-9] ports. ?I'm setting with_tune_32 at the same
> time, since otherwise -xtune still defaults to i386, which doesn't seem
> to make sense.
>
> For comparionds, I've looked at what recent versions of the Sun Studio
> compilers do:
>
> Release ? ? ? ? ? ? ? ? OS support ? ? ?-xarch default
>
> Studio 12 Update 1 ? ? ?S10 1/06+ ? ? ? generic (pentium_pro @ -m32,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sse2 @ -m64)
> Studio 12 ? ? ? ? ? ? ? S9+ ? ? ? ? ? ? generic (most likely pentium_pro, 386
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?isn't listed)
> Studio 11 ? ? ? ? ? ? ? S8, 9, 10 ? ? ? generic (386)
>
> Since we still support Solaris 7 (although obsoleted) and 8, one could
> argue to leave the -xarch at 386, but this seems counterproductive
> compared to what other platforms do. ?I'll probably add a hint to the
> installation guide.
>
> Bootstrapped without regressions on i386-pc-solaris2.11.
>
>
-march=pentium4 is OK. -mtune=pentium4 is a very bad idea since
it generates slower codes for almost all processors in use today. You
want -mtune=generic as the default.
--
H.J.