From: David Miller <da...@davemloft.net>
Date: Sun, 23 Oct 2011 16:32:36 -0400 (EDT)

> From: Eric Botcazou <ebotca...@adacore.com>
> Date: Sun, 23 Oct 2011 11:58:57 +0200
> 
>>> I'll try to brainstorm on this, thanks for letting me know about the
>>> Solaris target problem.
>> 
>> Let's fix the regression quickly though.
> 
> I'll fix it by the end of tonight.

Ok, I committed your suggestion to trunk for now.

--
[PATCH] Fix sol2 sparc -mv8 regression.

        * config/sparc/sparc.c (sparc_option_override): Remove -mv8plus
        cpu adjustment.
        * config/sparc/linux64.h (CC1_SPEC): When defaulting to 64-bit,
        append -mcpu=v9 when -mv8plus is given.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180362 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog              |    5 +++++
 gcc/config/sparc/linux64.h |    2 ++
 gcc/config/sparc/sparc.c   |    4 ----
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1842402..54e1a4f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
 2011-10-23  David S. Miller  <da...@davemloft.net>
 
+       * config/sparc/sparc.c (sparc_option_override): Remove -mv8plus
+       cpu adjustment.
+       * config/sparc/linux64.h (CC1_SPEC): When defaulting to 64-bit,
+       append -mcpu=v9 when -mv8plus is given.
+
        * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): We can move
        between float and non-float regs when VIS3.
        * config/sparc/sparc.c (eligible_for_restore_insn): We can't
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index a51a2f0..7604fa0 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -166,6 +166,8 @@ extern const char *host_detect_local_cpu (int argc, const 
char **argv);
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
   %{!mcpu*:-mcpu=cypress}} \
+%{mv8plus:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
+  %{!mcpu*:-mcpu=v9}} \
 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \
 "
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 79bb821..29d2922 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -1029,10 +1029,6 @@ sparc_option_override (void)
       sparc_cpu_and_features = def->processor;
     }
 
-  if ((target_flags & MASK_V8PLUS)
-      && sparc_cpu_and_features < PROCESSOR_V9)
-    sparc_cpu_and_features = PROCESSOR_V9;
-
   if (!global_options_set.x_sparc_cpu)
     sparc_cpu = sparc_cpu_and_features;
 
-- 
1.7.6.401.g6a319

Reply via email to