From 42032f7afdb630a73e9154d18c9e3fce53e6b95f Mon Sep 17 00:00:00 2001 From: Eric Botcazou <ebotcazou@libertysurf.fr> Date: Fri, 9 Jul 2004 10:31:34 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/sparc/sol2-bi.h | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb2205c3d301..ccfab79def18 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 6371acc9d7ea..857828ea9cb3 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 -- GitLab