Patchwork [19/25] Specs cleanup: SPARC -mcpu aliases

login
register
mail settings
Submitter Joseph S. Myers
Date Jan. 14, 2011, 12:16 a.m.
Message ID <Pine.LNX.4.64.1101140015130.6059@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/78847/
State New
Headers show

Comments

Joseph S. Myers - Jan. 14, 2011, 12:16 a.m.
Various SPARC configs have support for options -mcypress -msparclite
-mf930 -mf934 -mv8 -msupersparc, making them equivalent to -mcpu=
options.  This support is broken, since the original options will
still be passed to cc1 and be rejected as not appearing in .opt
files.  This patch removes the long-broken support.  (Note that specs
patching -mv8* are changed to match -mv8plus, which is a valid
option.)  OK to commit?

2011-01-13  Joseph Myers  <joseph@codesourcery.com>

	* config/sparc/linux.h (CC1_SPEC): Don't handle old equivalents of
	-mcpu options.
	* config/sparc/linux64.h (CC1_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise.
	* config/sparc/sol2-bi.h (CPP_CPU_SPEC, CC1_SPEC): Likewise.
	* config/sparc/sparc.h (CPP_CPU_SPEC, CC1_SPEC, ASM_CPU_SPEC):
	Likewise.
	* config/sparc/t-elf (MULTILIB_MATCHES): Don't handle -mv8.
Eric Botcazou - Jan. 14, 2011, 9:12 a.m.
> Various SPARC configs have support for options -mcypress -msparclite
> -mf930 -mf934 -mv8 -msupersparc, making them equivalent to -mcpu=
> options.  This support is broken, since the original options will
> still be passed to cc1 and be rejected as not appearing in .opt
> files.  This patch removes the long-broken support.

The support was explicitly removed in the 4.x series of compilers.

> 2011-01-13  Joseph Myers  <joseph@codesourcery.com>
>
> 	* config/sparc/linux.h (CC1_SPEC): Don't handle old equivalents of
> 	-mcpu options.
> 	* config/sparc/linux64.h (CC1_SPEC): Likewise.
> 	* config/sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise.
> 	* config/sparc/sol2-bi.h (CPP_CPU_SPEC, CC1_SPEC): Likewise.
> 	* config/sparc/sparc.h (CPP_CPU_SPEC, CC1_SPEC, ASM_CPU_SPEC):
> 	Likewise.
> 	* config/sparc/t-elf (MULTILIB_MATCHES): Don't handle -mv8.

OK, thanks.

Patch

diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
--- gcc-mainline-18/gcc/config/sparc/linux.h	2011-01-12 14:07:41.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux.h	2011-01-12 14:47:01.000000000 -0800
@@ -43,9 +43,6 @@  along with GCC; see the file COPYING3.  
 #undef	CC1_SPEC
 #define	CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 "
 
 #undef TARGET_VERSION
diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
--- gcc-mainline-18/gcc/config/sparc/linux64.h	2011-01-12 14:08:52.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux64.h	2011-01-12 14:48:02.000000000 -0800
@@ -149,23 +149,17 @@  along with GCC; see the file COPYING3.  
 #if DEFAULT_ARCH32_P
 #define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m64:-mptr64 -mstack-bias -mlong-double-128 \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
+  %{!mcpu*:-mcpu=ultrasparc} \
   %{!mno-vis:%{!mcpu=v9:-mvis}}} \
 "
 #else
 #define CC1_SPEC "%{profile:-p} \
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}}} \
+  %{!mcpu*:-mcpu=cypress}} \
 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \
 "
diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/netbsd-elf.h gcc-mainline/gcc/config/sparc/netbsd-elf.h
--- gcc-mainline-18/gcc/config/sparc/netbsd-elf.h	2010-12-06 06:41:54.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/netbsd-elf.h	2011-01-12 14:51:50.000000000 -0800
@@ -116,39 +116,21 @@  along with GCC; see the file COPYING3.  
 /* CC1_SPEC for NetBSD/sparc.  */
 #define CC1_SPEC32 \
  "%{sun4:} %{target:} \
-  %{mcypress:-mcpu=cypress} \
-  %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-  %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
   %{m32:%{m64:%emay not use both -m32 and -m64}} \
   %{m64: \
     -mptr64 -mstack-bias -mno-v8plus -mlong-double-128 \
-    %{!mcpu*: \
-      %{!mcypress: \
-        %{!msparclite: \
-	  %{!mf930: \
-	    %{!mf934: \
-	      %{!mv8*: \
-	        %{!msupersparc:-mcpu=ultrasparc}}}}}}} \
+    %{!mcpu*:%{!mv8plus:-mcpu=ultrasparc}} \
     %{!mno-vis:%{!mcpu=v9:-mvis}} \
     %{p:-mcmodel=medlow} \
     %{pg:-mcmodel=medlow}}"
 
 #define CC1_SPEC64 \
  "%{sun4:} %{target:} \
-  %{mcypress:-mcpu=cypress} \
-  %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-  %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
   %{m32:%{m64:%emay not use both -m32 and -m64}} \
   %{m32: \
     -mptr32 -mno-stack-bias \
     %{!mlong-double-128:-mlong-double-64} \
-    %{!mcpu*: \
-      %{!mcypress: \
-	%{!msparclite: \
-	  %{!mf930: \
-	    %{!mf934: \
-	      %{!mv8*: \
-		%{!msupersparc:-mcpu=cypress}}}}}}}} \
+    %{!mcpu*:%{!mv8plus:-mcpu=cypress}}} \
   %{!m32: \
     %{p:-mcmodel=medlow} \
     %{pg:-mcmodel=medlow}}"
diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/sol2-bi.h gcc-mainline/gcc/config/sparc/sol2-bi.h
--- gcc-mainline-18/gcc/config/sparc/sol2-bi.h	2010-04-24 14:15:08.000000000 -0700
+++ gcc-mainline/gcc/config/sparc/sol2-bi.h	2011-01-12 14:54:05.000000000 -0800
@@ -90,16 +90,12 @@  see the files COPYING3 and COPYING.RUNTI
 
 #undef CPP_CPU_SPEC
 #define CPP_CPU_SPEC "\
-%{mcypress:} \
-%{msparclite|mf930|mf934:-D__sparclite__} \
-%{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
 %{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
 %{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \
 %{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
 %{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
 %{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3|mcpu=niagara|mcpu=niagara2:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
+%{!mcpu*:%(cpp_cpu_default)} \
 "
 
 #undef ASM_CPU_SPEC
@@ -234,24 +230,18 @@  see the files COPYING3 and COPYING.RUNTI
 #if DEFAULT_ARCH32_P
 #define CC1_SPEC "\
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 %{m64:%{m32:%emay not use both -m32 and -m64}} \
 %{m64:-mptr64 -mstack-bias -mno-v8plus \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8*:%{!msupersparc:-mcpu=v9}}}}}}}} \
+  %{!mcpu*:-%{!mv8plus:mcpu=v9}}} \
 "
 #else
 #define CC1_SPEC "\
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m32:-mptr32 -mno-stack-bias \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8*:%{!msupersparc:-mcpu=v9}}}}}}}} \
+  %{!mcpu*:%{!mv8plus-mcpu=v9}}} \
 %{mv8plus:-m32 -mptr32 -mno-stack-bias \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=v9}}}}}}}} \
+  %{!mcpu*:-mcpu=v9}} \
 "
 #endif
 
diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/sparc.h gcc-mainline/gcc/config/sparc/sparc.h
--- gcc-mainline-18/gcc/config/sparc/sparc.h	2010-12-19 05:30:49.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/sparc.h	2011-01-12 14:55:28.000000000 -0800
@@ -361,11 +361,6 @@  extern enum cmodel sparc_cmodel;
    for handling -mcpu=xxx switches.  */
 #define CPP_CPU_SPEC "\
 %{msoft-float:-D_SOFT_FLOAT} \
-%{mcypress:} \
-%{msparclite:-D__sparclite__} \
-%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
-%{mv8:-D__sparc_v8__} \
-%{msupersparc:-D__supersparc__ -D__sparc_v8__} \
 %{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
 %{mcpu=sparclite:-D__sparclite__} \
 %{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
@@ -379,7 +374,7 @@  extern enum cmodel sparc_cmodel;
 %{mcpu=ultrasparc3:-D__sparc_v9__} \
 %{mcpu=niagara:-D__sparc_v9__} \
 %{mcpu=niagara2:-D__sparc_v9__} \
-%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
+%{!mcpu*:%(cpp_cpu_default)} \
 "
 #define CPP_ARCH32_SPEC ""
 #define CPP_ARCH64_SPEC "-D__arch64__"
@@ -411,16 +406,11 @@  extern enum cmodel sparc_cmodel;
 
 #define CC1_SPEC "\
 %{sun4:} %{target:} \
-%{mcypress:-mcpu=cypress} \
-%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
-%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 "
 
 /* Override in target specific files.  */
 #define ASM_CPU_SPEC "\
 %{mcpu=sparclet:-Asparclet} %{mcpu=tsc701:-Asparclet} \
-%{msparclite:-Asparclite} \
-%{mf930:-Asparclite} %{mf934:-Asparclite} \
 %{mcpu=sparclite:-Asparclite} \
 %{mcpu=sparclite86x:-Asparclite} \
 %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
@@ -430,7 +420,7 @@  extern enum cmodel sparc_cmodel;
 %{mcpu=ultrasparc3:%{!mv8plus:-Av9b}} \
 %{mcpu=niagara:%{!mv8plus:-Av9b}} \
 %{mcpu=niagara2:%{!mv8plus:-Av9b}} \
-%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(asm_cpu_default)}}}}}}} \
+%{!mcpu*:%(asm_cpu_default)} \
 "
 
 /* Word size selection, among other things.
diff -rupN --exclude=.svn gcc-mainline-18/gcc/config/sparc/t-elf gcc-mainline/gcc/config/sparc/t-elf
--- gcc-mainline-18/gcc/config/sparc/t-elf	2010-12-17 08:42:24.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/t-elf	2011-01-12 14:54:25.000000000 -0800
@@ -34,7 +34,7 @@  fp-bit.c: $(srcdir)/config/fp-bit.c
 
 MULTILIB_OPTIONS = msoft-float mcpu=v8
 MULTILIB_DIRNAMES = soft v8
-MULTILIB_MATCHES = msoft-float=mno-fpu mcpu?v8=mv8
+MULTILIB_MATCHES = msoft-float=mno-fpu
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib