Patchwork Fix SPARC -fpu -no-fpu specs

login
register
mail settings
Submitter Joseph S. Myers
Date Feb. 17, 2011, 12:47 a.m.
Message ID <Pine.LNX.4.64.1102170046170.15478@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/83417/
State New
Headers show

Comments

Joseph S. Myers - Feb. 17, 2011, 12:47 a.m.
Various SPARC implementations of OPTION_DEFAULT_SPECS match options
-fpu and -no-fpu.  These options are not mentioned in sparc.opt and it
seems likely (including from the comments about those specs) that
-mfpu and -mno-fpu are intended; this patch adjusts those specs
accordingly.

Tested building cc1 and xgcc for crosses to: sparc-elf
sparc-solaris2.10 sparc64-linux-gnu.  OK to commit?

2011-02-16  Joseph Myers  <joseph@codesourcery.com>

	* config/sparc/linux64.h (OPTION_DEFAULT_SPECS): Match -mfpu and
	-mno-fpu, not -fpu and -no-fpu.
	* config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): Likewise.
	* config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Likewise.
Paolo Bonzini - Feb. 17, 2011, 8:33 a.m.
On 02/17/2011 01:47 AM, Joseph S. Myers wrote:
> -  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
> +  {"float", "%{!msoft-float:%{!mhard-float:%{!fmpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }

Typo (fmpu).

Paolo
Eric Botcazou - Feb. 17, 2011, 11:58 a.m.
> 2011-02-16  Joseph Myers  <joseph@codesourcery.com>
>
> 	* config/sparc/linux64.h (OPTION_DEFAULT_SPECS): Match -mfpu and
> 	-mno-fpu, not -fpu and -no-fpu.
> 	* config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): Likewise.
> 	* config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Likewise.

OK modulo the typo spotted by Paolo.

Patch

Index: gcc/config/sparc/sol2-bi.h
===================================================================
--- gcc/config/sparc/sol2-bi.h	(revision 170230)
+++ gcc/config/sparc/sol2-bi.h	(working copy)
@@ -256,12 +256,12 @@  see the files COPYING3 and COPYING.RUNTI
 #define OPTION_DEFAULT_SPECS \
   {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
   {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
-  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
+  {"float", "%{!msoft-float:%{!mhard-float:%{!fmpu:%{!mno-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}}}}" }
+  {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
 #endif
 
 #if DEFAULT_ARCH32_P
Index: gcc/config/sparc/sparc.h
===================================================================
--- gcc/config/sparc/sparc.h	(revision 170230)
+++ gcc/config/sparc/sparc.h	(working copy)
@@ -551,7 +551,7 @@  extern enum processor_type sparc_cpu;
 #define OPTION_DEFAULT_SPECS \
   {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \
   {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
-  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
+  {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
 
 /* sparc_select[0] is reserved for the default cpu.  */
 struct sparc_cpu_select
Index: gcc/config/sparc/linux64.h
===================================================================
--- gcc/config/sparc/linux64.h	(revision 170230)
+++ gcc/config/sparc/linux64.h	(working copy)
@@ -176,12 +176,12 @@  along with GCC; see the file COPYING3.  
 #define OPTION_DEFAULT_SPECS \
   {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
   {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
-  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
+  {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-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}}}}" }
+  {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
 #endif
 
 #if DEFAULT_ARCH32_P