This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: lib{atomic, itm}/configure.tgt uses -mcpu=v9 as default for sparc
- From: csanchezdll at gmail dot com (Carlos SÃnchez de La Lama)
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 03 Jun 2014 12:17:53 +0000
- Subject: Re: lib{atomic, itm}/configure.tgt uses -mcpu=v9 as default for sparc
- Authentication-results: sourceware.org; auth=none
- References: <daz8upf8y2z dot fsf at sdf dot lonestar dot org> <4871468 dot TDuAmUELpQ at polaris> <dazwqcz7d9e dot fsf at sdf dot lonestar dot org> <3271892 dot bKmkptFVPT at polaris>
>> IMHO an efficiency enhancement should not prevent running less
>> efficiently on a supported architecture. If target triple is
>> sparcv9-*-*, the next case will match and will add the "-mcpu=v9" to
>> XCFLAGS, but adding it for non-v9 sparc-*-* targets is at least weird.
>
> Well, V9 is about 20 years old now so defaulting to it is not unreasonable,
> especially for all the native OSes. But patches are of course
> welcome.
You might be right. My point was if target was not v9, configure should
take care of whatever is needed to build a working compiler (and target
libraries) without passing extra switches (probably setting UNSUPPORTED
in sparc-*-* cases of configure.tgt).
However, I have got the latest config.guess from git and now I see
sparc-*-* is not enough to ensure v7 or v8, but it is also a valid
triple for v9 targets, so there is no way to configure script to know if
it can use v9 or not, and just avoiding v9 optimizationes in all SPARC
compilers is clearly wrong. So I agree defaulting to v9 is correct.
I will build with the suggested disable switches. Thank you!
Carlos