aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-07-09 10:31:34 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-07-09 08:31:34 +0000
commit42032f7afdb630a73e9154d18c9e3fce53e6b95f (patch)
treee42e4f25dcfc36d73507f0e3ac1c5878ac4a1093
parentf4cbb208fb7e980ce24ecace675d51d885c1fd6a (diff)
downloadgcc-42032f7afdb630a73e9154d18c9e3fce53e6b95f.zip
gcc-42032f7afdb630a73e9154d18c9e3fce53e6b95f.tar.gz
gcc-42032f7afdb630a73e9154d18c9e3fce53e6b95f.tar.bz2
re PR target/16416 (-m64 doesn't imply -mcpu=v9 anymore)
PR target/16416 * config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): New macro. Override default settings to account for -m32 and -m64. From-SVN: r84347
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sparc/sol2-bi.h21
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fb2205c..ccfab79 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2004-07-08 Randolph Chung <tausq@debian.org>
* pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h
index 6371acc..857828e 100644
--- a/gcc/config/sparc/sol2-bi.h
+++ b/gcc/config/sparc/sol2-bi.h
@@ -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