Patchwork [20/25] Specs cleanup: SPARC -sun4 -target

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

Comments

Joseph S. Myers - Jan. 14, 2011, 12:17 a.m.
Various SPARC targets have support for -sun4 and -target options in
the form of %{sun4:} %{target:} specs (meaning the options are
accepted by the driver, with no arguments, and do nothing).

I don't know whether these are accepted by Sun's current Solaris
compilers and there might be a case for keeping them for Solaris for
compatibility with those, but they certainly don't make sense for
other target OSes.  This patch accordingly removes them for
non-Solaris targets (sparc*-*-solaris2* always uses sparc/sol2-bi.h,
which still has these options).  OK to commit?

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

	* config/sparc/linux.h (CC1_SPEC): Remove %{sun4:} %{target:}.
	* config/sparc/linux64.h (CC1_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise.
	* config/sparc/sparc.h (CC1_SPEC): Likewise.
Eric Botcazou - Jan. 14, 2011, 9:15 a.m.
> 2011-01-13  Joseph Myers  <joseph@codesourcery.com>
>
> 	* config/sparc/linux.h (CC1_SPEC): Remove %{sun4:} %{target:}.
> 	* config/sparc/linux64.h (CC1_SPEC): Likewise.
> 	* config/sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise.
> 	* config/sparc/sparc.h (CC1_SPEC): Likewise.

OK, thanks.

Patch

diff -rupN --exclude=.svn gcc-mainline-19/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
--- gcc-mainline-19/gcc/config/sparc/linux.h	2011-01-12 14:47:01.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux.h	2011-01-12 14:58:56.000000000 -0800
@@ -42,7 +42,6 @@  along with GCC; see the file COPYING3.  
 /* This is for -profile to use -lc_p instead of -lc.  */
 #undef	CC1_SPEC
 #define	CC1_SPEC "%{profile:-p} \
-%{sun4:} %{target:} \
 "
 
 #undef TARGET_VERSION
diff -rupN --exclude=.svn gcc-mainline-19/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
--- gcc-mainline-19/gcc/config/sparc/linux64.h	2011-01-12 14:48:02.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux64.h	2011-01-12 14:59:05.000000000 -0800
@@ -148,7 +148,6 @@  along with GCC; see the file COPYING3.  
 #undef	CC1_SPEC
 #if DEFAULT_ARCH32_P
 #define CC1_SPEC "%{profile:-p} \
-%{sun4:} %{target:} \
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m64:-mptr64 -mstack-bias -mlong-double-128 \
   %{!mcpu*:-mcpu=ultrasparc} \
@@ -156,7 +155,6 @@  along with GCC; see the file COPYING3.  
 "
 #else
 #define CC1_SPEC "%{profile:-p} \
-%{sun4:} %{target:} \
 %{m32:%{m64:%emay not use both -m32 and -m64}} \
 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
   %{!mcpu*:-mcpu=cypress}} \
diff -rupN --exclude=.svn gcc-mainline-19/gcc/config/sparc/netbsd-elf.h gcc-mainline/gcc/config/sparc/netbsd-elf.h
--- gcc-mainline-19/gcc/config/sparc/netbsd-elf.h	2011-01-12 14:51:50.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/netbsd-elf.h	2011-01-12 14:59:18.000000000 -0800
@@ -115,8 +115,7 @@  along with GCC; see the file COPYING3.  
 
 /* CC1_SPEC for NetBSD/sparc.  */
 #define CC1_SPEC32 \
- "%{sun4:} %{target:} \
-  %{m32:%{m64:%emay not use both -m32 and -m64}} \
+ "%{m32:%{m64:%emay not use both -m32 and -m64}} \
   %{m64: \
     -mptr64 -mstack-bias -mno-v8plus -mlong-double-128 \
     %{!mcpu*:%{!mv8plus:-mcpu=ultrasparc}} \
@@ -125,8 +124,7 @@  along with GCC; see the file COPYING3.  
     %{pg:-mcmodel=medlow}}"
 
 #define CC1_SPEC64 \
- "%{sun4:} %{target:} \
-  %{m32:%{m64:%emay not use both -m32 and -m64}} \
+ "%{m32:%{m64:%emay not use both -m32 and -m64}} \
   %{m32: \
     -mptr32 -mno-stack-bias \
     %{!mlong-double-128:-mlong-double-64} \
diff -rupN --exclude=.svn gcc-mainline-19/gcc/config/sparc/sparc.h gcc-mainline/gcc/config/sparc/sparc.h
--- gcc-mainline-19/gcc/config/sparc/sparc.h	2011-01-12 14:55:28.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/sparc.h	2011-01-12 14:59:59.000000000 -0800
@@ -398,15 +398,10 @@  extern enum cmodel sparc_cmodel;
 
 #define CPP_SPEC "%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"
 
-/* Prevent error on `-sun4' and `-target sun4' options.  */
 /* This used to translate -dalign to -malign, but that is no good
    because it can't turn off the usual meaning of making debugging dumps.  */
-/* Translate old style -m<cpu> into new style -mcpu=<cpu>.
-   ??? Delete support for -m<cpu> for 2.9.  */
 
-#define CC1_SPEC "\
-%{sun4:} %{target:} \
-"
+#define CC1_SPEC ""
 
 /* Override in target specific files.  */
 #define ASM_CPU_SPEC "\