This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PR target/16416
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Jul 2004 10:29:35 +0200
- Subject: Fix PR target/16416
-m64 doesn't imply -mcpu=v9 anymore on sparc-sun-solaris2.7+, a regression
from 3.3.x present on 3.4 branch and mainline. This has already been fixed
for Linux by Jakub, I'm only two months late. :-)
Bootstrapped/regtested on sparc64-sun-solaris2.9 and sparc-sun-solaris2.8.
Applied to mainline and 3.4 branch
2004-07-09 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/16416
* config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): New macro.
Override default settings to account for -m32 and -m64.
--
Eric Botcazou
Index: config/sparc/sol2-bi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-bi.h,v
retrieving revision 1.14.4.2
diff -u -r1.14.4.2 sol2-bi.h
--- config/sparc/sol2-bi.h 5 Apr 2004 04:10:09 -0000 1.14.4.2
+++ config/sparc/sol2-bi.h 8 Jul 2004 19:37:18 -0000
@@ -210,6 +210,27 @@
"
#endif
+/* Support for a compile-time default CPU, et cetera. The rules are:
+ --with-cpu is ignored if -mcpu is specified.
+ --with-tune is ignored if -mtune is specified.
+ --with-float is ignored if -mhard-float, -msoft-float, -mfpu, or -mno-fpu
+ are specified.
+ In the SPARC_BI_ARCH compiler we cannot pass %{!mcpu=*:-mcpu=%(VALUE)}
+ here, otherwise say -mcpu=v7 would be passed even when -m64.
+ CC1_SPEC above takes care of this instead. */
+#undef OPTION_DEFAULT_SPECS
+#if DEFAULT_ARCH32_P
+#define OPTION_DEFAULT_SPECS \
+ {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
+ {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
+ {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
+#else
+#define OPTION_DEFAULT_SPECS \
+ {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
+ {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
+ {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
+#endif
+
#if DEFAULT_ARCH32_P
#define MULTILIB_DEFAULTS { "m32" }
#else