Patchwork [3/9] Specs cleanup: -n and -T for assembler

login
register
mail settings
Submitter Joseph S. Myers
Date Dec. 2, 2010, 4:34 p.m.
Message ID <Pine.LNX.4.64.1012021634030.26340@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/73992/
State New
Headers show

Comments

Joseph S. Myers - Dec. 2, 2010, 4:34 p.m.
Various targets have %{n} and %{T} in their assembler specs.  Ian
removed these for x86 targets with the GNU assembler in
<http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02310.html>, but it does
not make sense to pass them to *any* assembler on *any* target, since
they are handled target-independently as *linker* options.  This patch
removes them.

2010-12-02  Joseph Myers  <joseph@codesourcery.com>

	* config/bfin/bfin.h (ASM_SPEC): Remove %{n} and %{T}.
	* config/frv/frv.h (ASM_SPEC): Likewise.
	* config/i386/sol2-10.h (ASM_SPEC): Likewise.
	* config/i386/sol2.h (ASM_SPEC): Likewise.
	* config/m68k/linux.h (ASM_SPEC): Likewise.
	* config/pa/pa-linux.h (ASM_SPEC): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC32): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/sol2.h (ASM_SPEC): Likewise.
	* config/sparc/linux.h (ASM_SPEC): Likewise.
	* config/sparc/linux64.h (ASM_SPEC): Likewise.
	* config/sparc/sp-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sysv4.h (ASM_SPEC): Likewise.
	* config/svr4.h (SVR4_ASM_SPEC): Likewise.
Joseph S. Myers - Dec. 9, 2010, 11:29 a.m.
Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00192.html> is pending 
review.
Richard Guenther - Dec. 9, 2010, 12:49 p.m.
On Thu, Dec 9, 2010 at 12:29 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> Ping.  This patch
> <http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00192.html> is pending
> review.

This is ok.

Thanks,
Richard.

> --
> Joseph S. Myers
> joseph@codesourcery.com
>

Patch

diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/bfin/bfin.h gcc-mainline/gcc/config/bfin/bfin.h
--- gcc-mainline-2/gcc/config/bfin/bfin.h	2010-12-01 16:23:49.000000000 -0800
+++ gcc-mainline/gcc/config/bfin/bfin.h	2010-12-01 16:52:22.000000000 -0800
@@ -248,7 +248,7 @@  extern unsigned int bfin_workarounds;
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{v} %{n} %{T} %{Ym,*} %{Yd,*} \
+%{v} %{Ym,*} %{Yd,*} \
     %{mno-fdpic:-mnopic} %{mfdpic}"
 
 #define LINK_SPEC "\
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/frv/frv.h gcc-mainline/gcc/config/frv/frv.h
--- gcc-mainline-2/gcc/config/frv/frv.h	2010-12-01 16:24:01.000000000 -0800
+++ gcc-mainline/gcc/config/frv/frv.h	2010-12-01 16:52:36.000000000 -0800
@@ -71,7 +71,7 @@ 
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} \
+%{G*} %{v} %{Ym,*} %{Yd,*} \
 %{mtomcat-stats} \
 %{!mno-eflags: \
     %{mcpu=*} \
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/i386/sol2-10.h gcc-mainline/gcc/config/i386/sol2-10.h
--- gcc-mainline-2/gcc/config/i386/sol2-10.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/sol2-10.h	2010-12-01 16:53:00.000000000 -0800
@@ -28,7 +28,7 @@  along with GCC; see the file COPYING3.  
 #ifdef USE_GAS
 #define ASM_SPEC "%{v} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
 #else
-#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
+#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} " \
 		 "%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
 		 "-s %(asm_cpu)"
 #endif
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/i386/sol2.h gcc-mainline/gcc/config/i386/sol2.h
--- gcc-mainline-2/gcc/config/i386/sol2.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/sol2.h	2010-12-01 16:53:09.000000000 -0800
@@ -54,7 +54,7 @@  along with GCC; see the file COPYING3.  
 /* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
    gives many warnings: R_386_32 relocation is used for symbol ".text".  */
 #undef ASM_SPEC
-#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s %(asm_cpu)"
+#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)"
 
 #define ASM_CPU_SPEC ""
  
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-2/gcc/config/m68k/linux.h	2009-12-30 09:05:35.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h	2010-12-01 16:53:30.000000000 -0800
@@ -1,7 +1,7 @@ 
 /* Definitions for Motorola 68k running Linux-based GNU systems with
    ELF format.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006,
-   2007, 2009 Free Software Foundation, Inc.
+   2007, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -25,7 +25,7 @@  along with GCC; see the file COPYING3.  
 /* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC.  */
 #undef ASM_SPEC
 #define ASM_SPEC "%(asm_cpu_spec) %(asm_pcrel_spec) \
-  %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
+  %{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
 
 #undef PREFERRED_STACK_BOUNDARY
 #define PREFERRED_STACK_BOUNDARY 32
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/pa/pa-linux.h gcc-mainline/gcc/config/pa/pa-linux.h
--- gcc-mainline-2/gcc/config/pa/pa-linux.h	2010-12-01 16:25:30.000000000 -0800
+++ gcc-mainline/gcc/config/pa/pa-linux.h	2010-12-01 16:53:39.000000000 -0800
@@ -33,7 +33,7 @@  along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC \
-  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*}"
+  "%{v:-V} %{Ym,*} %{Yd,*}"
 
 /* Define this for shared library support because it isn't in the main
    linux.h file.  */
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/rs6000/linux64.h gcc-mainline/gcc/config/rs6000/linux64.h
--- gcc-mainline-2/gcc/config/rs6000/linux64.h	2010-12-01 16:26:42.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/linux64.h	2010-12-01 16:53:56.000000000 -0800
@@ -192,7 +192,7 @@  extern int dot_symbols;
 #endif
 #endif
 
-#define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
+#define ASM_SPEC32 "-a32 %{Ym,*} %{Yd,*} \
 %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
 %{memb} %{!memb: %{msdata=eabi: -memb}} \
 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/rs6000/vxworks.h gcc-mainline/gcc/config/rs6000/vxworks.h
--- gcc-mainline-2/gcc/config/rs6000/vxworks.h	2010-12-01 16:27:10.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/vxworks.h	2010-12-01 16:54:09.000000000 -0800
@@ -87,7 +87,7 @@  VXWORKS_ADDITIONAL_CPP_SPEC
 #define ASM_SPEC \
 "%(asm_cpu) \
  %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
- %{v:-v} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
+ %{v:-v} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} \
  %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
 
 #undef  LIB_SPEC
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sol2.h gcc-mainline/gcc/config/sol2.h
--- gcc-mainline-2/gcc/config/sol2.h	2010-12-01 16:21:51.000000000 -0800
+++ gcc-mainline/gcc/config/sol2.h	2010-12-01 16:52:05.000000000 -0800
@@ -115,7 +115,7 @@  along with GCC; see the file COPYING3.  
    It's safe to pass -s always, even if -g is not used.  */
 #undef ASM_SPEC
 #define ASM_SPEC "\
-%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
+%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s \
 %{fpic|fpie|fPIC|fPIE:-K PIC} \
 %(asm_cpu) \
 "
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
--- gcc-mainline-2/gcc/config/sparc/linux.h	2010-12-01 16:27:36.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux.h	2010-12-01 16:54:16.000000000 -0800
@@ -102,8 +102,6 @@  along with GCC; see the file COPYING3.  
 %{V} \
 %{v:%{!V:-V}} \
 %{!Qn:-Qy} \
-%{n} \
-%{T} \
 %{Ym,*} \
 -s \
 %{fpic|fPIC|fpie|fPIE:-K PIC} \
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
--- gcc-mainline-2/gcc/config/sparc/linux64.h	2010-12-01 16:27:58.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux64.h	2010-12-01 16:54:26.000000000 -0800
@@ -231,8 +231,6 @@  along with GCC; see the file COPYING3.  
 %{V} \
 %{v:%{!V:-V}} \
 %{!Qn:-Qy} \
-%{n} \
-%{T} \
 %{Ym,*} \
 -s \
 %{fpic|fPIC|fpie|fPIE:-K PIC} \
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sparc/sp-elf.h gcc-mainline/gcc/config/sparc/sp-elf.h
--- gcc-mainline-2/gcc/config/sparc/sp-elf.h	2010-12-01 16:28:09.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/sp-elf.h	2010-12-01 16:54:34.000000000 -0800
@@ -28,7 +28,7 @@  along with GCC; see the file COPYING3.  
    It's safe to pass -s always, even if -g is not used.  */
 #undef ASM_SPEC
 #define ASM_SPEC \
-  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s \
    %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu)"
 
 /* Use the default.  */
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/sparc/sysv4.h gcc-mainline/gcc/config/sparc/sysv4.h
--- gcc-mainline-2/gcc/config/sparc/sysv4.h	2010-12-01 16:28:17.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/sysv4.h	2010-12-01 16:54:43.000000000 -0800
@@ -50,7 +50,7 @@  along with GCC; see the file COPYING3.  
 /* Pass -K to the assembler when PIC.  */
 #undef ASM_SPEC
 #define ASM_SPEC \
-  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} \
    %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
 
 /* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
diff -rupN --exclude=.svn gcc-mainline-2/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
--- gcc-mainline-2/gcc/config/svr4.h	2010-12-01 16:22:08.000000000 -0800
+++ gcc-mainline/gcc/config/svr4.h	2010-12-01 16:52:13.000000000 -0800
@@ -66,7 +66,7 @@  see the files COPYING3 and COPYING.RUNTI
   "%{v:-V}"
 #else
 #define SVR4_ASM_SPEC \
-  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
 #endif
 
 #undef  ASM_SPEC