public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [0/9] Specs cleanup: introduction
@ 2010-12-02 16:32 Joseph S. Myers
  2010-12-02 16:33 ` [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl, Joseph S. Myers
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:32 UTC (permalink / raw)
  To: gcc-patches

I am in the process of going through all specs for all targets to
identify all GCC options that exist only through being handled in
specs, so as to enter them in .opt files so we can eliminate the
possibility of creating an option just in specs and ensure that all
options have a more structured existence through a .opt entry.

In this process I have found many oddities in existing specs where
they contain code that is useless or incorrect.  This patch series
cleans up some such issues.  This is just an initial series of
cleanups; further cleanups will follow.  In particular, while this
series applies some of Ian's cleanups in
<http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02310.html> more
generally, it doesn't cover all of them and some may require
duplicating specs into GNU and non-GNU assembler cases (which I did
not do at all in this patch series).

The combination of all nine patches has been bootstrapped with no
regressions on x86_64-unknown-linux-gnu.  I also tested building cc1
and xgcc for crosses to: alpha-freebsd8 alpha-linux-gnu arc-elf
arm-freebsd8 arm-linux-gnueabi bfin-elf bfin-uclinux cris-elf
cris-linux-gnu i686-darwin fr30-elf frv-elf frv-linux-gnu
i686-pc-msdosdjgpp i686-freebsd8 x86_64-freebsd8 i686-pc-linux-gnu
x86_64-w64-mingw32 i686-netware i686-nto-qnx i686-openbsd
i686-solaris2.10 i686-solaris2.8 i686-wrs-vxworks ia64-freebsd8
ia64-linux-gnu lm32-elf lm32-uclinux m32r-linux-gnu m32r-elf
m68k-linux-gnu microblaze-linux-gnu microblaze-elf mips-linux-gnu
mips64-linux-gnu mips-elf mips-openbsd mips-wrs-vxworks
am33_2.0-linux-gnu arm-netbsd arm-netbsdelf hppa-linux-gnu
powerpc-freebsd8 powerpc64-linux-gnu powerpc-wrs-vxworks
s390-linux-gnu sh-linux-gnu sparc64-freebsd8 sparc-linux-gnu
sparc64-linux-gnu sparc-netbsdelf sparc64-openbsd vax-linux-gnu
vax-netbsdelf xtensa-elf xtensa-linux-gnu.  Two of these failed for
apparently unrelated reasons: lm32-uclinux ("Unsupported DEFAULT_LIBC"
- if you use config/linux.h you now need to define DEFAULT_LIBC in
config.gcc) and am33_2.0-linux-gnu ("targhooks.c:342: undefined
reference to `print_operand_address'" - not investigated).  OK to
commit?

If only a subset of the patches are approved I'll retest the relevant
subset as needed.  I think each patch is correct on its own, but each
is also relative to a tree with the previous patches applied, and as
noted above they have only been tested together.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl,
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
@ 2010-12-02 16:33 ` Joseph S. Myers
  2010-12-02 16:38   ` Richard Guenther
  2010-12-02 16:34 ` [2/9] Specs cleanup: -A, -d and -m for linker Joseph S. Myers
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:33 UTC (permalink / raw)
  To: gcc-patches

Various targets have ASM_SPEC or LINK_SPEC handling -Wa, and -Wl,.
This serves no purpose; those options are processed by the driver in
such a way that they are never seen by specs, so (a) there is no need
for specs to pass them through to the relevant tools and (b) it is not
possible for specs to test whether a particular option was passed with
-Wa, or -Wl,.  This patch removes all these useless specs.

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

	* config/alpha/freebsd.h (LINK_SPEC): Don't handle -Wl,.
	* config/bfin/bfin.h (ASM_SPEC): Don't handle -Wa,.
	* config/frv/frv.h (ASM_SPEC): Don't handle -Wa,.
	* config/lm32/uclinux-elf.h (LINK_SPEC): Don't handle -Wl,.
	* config/microblaze/microblaze.h (LINK_SPEC): Don't handle -Wl,.
	* config/mn10300/linux.h (ASM_SPEC): Don't handle -Wa,.
	* config/pa/pa-linux.h (ASM_SPEC): Don't handle -Wa,.
	* config/rs6000/freebsd.h (SVR4_ASM_SPEC): Don't handle -Wa,.
	* config/rs6000/linux64.h (ASM_SPEC_COMMON): Don't handle -Wa,.
	* config/rs6000/sysv4.h (LINK_SPEC): Don't handle -Wl,.
	* config/rs6000/vxworks.h (ASM_SPEC): Don't handle -Wa,.
	* config/sol2.h (ASM_SPEC): Don't handle -Wa,.
	* config/sparc/linux.h (ASM_SPEC): Don't handle -Wa,.
	* config/sparc/linux64.h (ASM_SPEC): Don't handle -Wa,.
	* config/sparc/sp-elf.h (ASM_SPEC): Don't handle -Wa,.
	* config/sparc/sysv4.h (ASM_SPEC): Don't handle -Wa,.
	* config/svr4.h (SVR4_ASM_SPEC): Don't handle -Wa,.
	* config/vxworks.h (VXWORKS_LINK_SPEC): Don't handle -Wl,.

Index: gcc/config/alpha/freebsd.h
===================================================================
--- gcc/config/alpha/freebsd.h	(revision 167352)
+++ gcc/config/alpha/freebsd.h	(working copy)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.  
 
 #define LINK_SPEC "%{G*} %{relax:-relax}				\
   %{p:%nconsider using '-pg' instead of '-p' with gprof(1)}		\
-  %{Wl,*:%*}								\
   %{assert*} %{R*} %{rpath*} %{defsym*}					\
   %{shared:-Bshareable %{h*} %{soname*}}				\
   %{!shared:								\
Index: gcc/config/frv/frv.h
===================================================================
--- gcc/config/frv/frv.h	(revision 167352)
+++ gcc/config/frv/frv.h	(working copy)
@@ -71,7 +71,7 @@
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
+%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} \
 %{mtomcat-stats} \
 %{!mno-eflags: \
     %{mcpu=*} \
Index: gcc/config/sparc/linux.h
===================================================================
--- gcc/config/sparc/linux.h	(revision 167352)
+++ gcc/config/sparc/linux.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions for SPARC running Linux-based GNU systems with ELF.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009 Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Eddie C. Dost (ecd@skynet.be)
 
 This file is part of GCC.
@@ -105,7 +105,6 @@ along with GCC; see the file COPYING3.  
 %{n} \
 %{T} \
 %{Ym,*} \
-%{Wa,*:%*} \
 -s \
 %{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{!.c:%{findirect-dispatch:-K PIC}} \
Index: gcc/config/sparc/sp-elf.h
===================================================================
--- gcc/config/sparc/sp-elf.h	(revision 167352)
+++ gcc/config/sparc/sp-elf.h	(working copy)
@@ -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,*} %{Wa,*:%*} -s \
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
    %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu)"
 
 /* Use the default.  */
Index: gcc/config/sparc/linux64.h
===================================================================
--- gcc/config/sparc/linux64.h	(revision 167352)
+++ gcc/config/sparc/linux64.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
    Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by David S. Miller (davem@caip.rutgers.edu)
 
 This file is part of GCC.
@@ -234,7 +234,6 @@ along with GCC; see the file COPYING3.  
 %{n} \
 %{T} \
 %{Ym,*} \
-%{Wa,*:%*} \
 -s \
 %{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{!.c:%{findirect-dispatch:-K PIC}} \
Index: gcc/config/sparc/sysv4.h
===================================================================
--- gcc/config/sparc/sysv4.h	(revision 167352)
+++ gcc/config/sparc/sysv4.h	(working copy)
@@ -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,*} %{Wa,*:%*} \
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
    %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
 
 /* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
Index: gcc/config/sol2.h
===================================================================
--- gcc/config/sol2.h	(revision 167352)
+++ gcc/config/sol2.h	(working copy)
@@ -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,*} %{Wa,*:%*} -s \
+%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
 %{fpic|fpie|fPIC|fPIE:-K PIC} \
 %(asm_cpu) \
 "
Index: gcc/config/microblaze/microblaze.h
===================================================================
--- gcc/config/microblaze/microblaze.h	(revision 167352)
+++ gcc/config/microblaze/microblaze.h	(working copy)
@@ -87,7 +87,7 @@ extern enum pipeline_type microblaze_pip
   %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
   %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
   %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
-  %{!Wl,-T*: %{!T*: -dT xilinx.ld%s}}"
+  %{!T*: -dT xilinx.ld%s}"
 
 /* Specs for the compiler proper  */
 
Index: gcc/config/lm32/uclinux-elf.h
===================================================================
--- gcc/config/lm32/uclinux-elf.h	(revision 167352)
+++ gcc/config/lm32/uclinux-elf.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions for LM32 running Linux-based GNU systems using ELF
    Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by Philip Blundell <philb@gnu.org>
 
    This file is part of GCC.
@@ -68,7 +68,7 @@
 
 #undef  LINK_SPEC
 #define LINK_SPEC "%{h*} %{version:-v} \
-   %{b} %{Wl,*:%*} \
+   %{b} \
    %{static:-Bstatic} \
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
Index: gcc/config/svr4.h
===================================================================
--- gcc/config/svr4.h	(revision 167352)
+++ gcc/config/svr4.h	(working copy)
@@ -63,10 +63,10 @@ see the files COPYING3 and COPYING.RUNTI
 
 #ifdef USE_GAS
 #define SVR4_ASM_SPEC \
-  "%{v:-V} %{Wa,*:%*}"
+  "%{v:-V}"
 #else
 #define SVR4_ASM_SPEC \
-  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
 #endif
 
 #undef  ASM_SPEC
Index: gcc/config/mn10300/linux.h
===================================================================
--- gcc/config/mn10300/linux.h	(revision 167352)
+++ gcc/config/mn10300/linux.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions of taret machine for GNU compiler.
    Matsushita AM33/2.0
-   Copyright 2001, 2002, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
    Contributed by Alexandre Oliva <aoliva@redhat.com>
 
    This file is part of GCC.
@@ -30,7 +30,7 @@
   %{pthread:-D_REENTRANT -D_PTHREADS}"
 
 #undef  ASM_SPEC
-#define ASM_SPEC "%{Wa,*:%*}"
+#define ASM_SPEC ""
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
 
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 167352)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -207,7 +207,7 @@ extern int dot_symbols;
 
 #define ASM_SPEC_COMMON "%(asm_cpu) \
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
-%{v:-V} %{Qy:} %{!Qn:-Qy} %{Wa,*:%*} \
+%{v:-V} %{Qy:} %{!Qn:-Qy} \
 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
 
 #undef	SUBSUBTARGET_EXTRA_SPECS
Index: gcc/config/rs6000/freebsd.h
===================================================================
--- gcc/config/rs6000/freebsd.h	(revision 167352)
+++ gcc/config/rs6000/freebsd.h	(working copy)
@@ -1,5 +1,5 @@
 /* Definitions for PowerPC running FreeBSD using the ELF format
-   Copyright (C) 2001, 2003, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
    Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
 
    This file is part of GCC.
@@ -71,4 +71,4 @@
 #define ASM_APP_OFF "#NO_APP\n"
 /* Define SVR4_ASM_SPEC, we use GAS by default. See svr4.h for details.  */
 #define SVR4_ASM_SPEC \
-  "%{v:-V} %{Wa,*:%*}"
+  "%{v:-V}"
Index: gcc/config/rs6000/vxworks.h
===================================================================
--- gcc/config/rs6000/vxworks.h	(revision 167352)
+++ gcc/config/rs6000/vxworks.h	(working copy)
@@ -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,*} %{Wa,*:%*} \
+ %{v:-v} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
  %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
 
 #undef  LIB_SPEC
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 167352)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -644,7 +644,7 @@ SVR4_ASM_SPEC \
 %{YP,*} %{R*} \
 %{Qy:} %{!Qn:-Qy} \
 %(link_shlib) \
-%{!Wl,-T*: %{!T*: %(link_start) }} \
+%{!T*: %(link_start) } \
 %(link_target) \
 %(link_os)"
 
Index: gcc/config/pa/pa-linux.h
===================================================================
--- gcc/config/pa/pa-linux.h	(revision 167352)
+++ gcc/config/pa/pa-linux.h	(working copy)
@@ -1,5 +1,5 @@
 /* Definitions for PA_RISC with ELF format
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC \
-  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
+  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*}"
 
 /* Define this for shared library support because it isn't in the main
    linux.h file.  */
Index: gcc/config/vxworks.h
===================================================================
--- gcc/config/vxworks.h	(revision 167352)
+++ gcc/config/vxworks.h	(working copy)
@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3.  
 "%{!mrtp:-r}						\
  %{!shared:						\
    %{mrtp:-q %{h*}					\
-          %{R*} %{!Wl,-T*: %{!T*: %(link_start) }}	\
+          %{R*} %{!T*: %(link_start) }			\
           %(link_target) %(link_os)}}			\
  %{v:-v}						\
  %{shared:-shared}					\
Index: gcc/config/bfin/bfin.h
===================================================================
--- gcc/config/bfin/bfin.h	(revision 167352)
+++ gcc/config/bfin/bfin.h	(working copy)
@@ -248,7 +248,7 @@ extern unsigned int bfin_workarounds;
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
+%{v} %{n} %{T} %{Ym,*} %{Yd,*} \
     %{mno-fdpic:-mnopic} %{mfdpic}"
 
 #define LINK_SPEC "\

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [2/9] Specs cleanup: -A, -d and -m for linker
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
  2010-12-02 16:33 ` [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl, Joseph S. Myers
@ 2010-12-02 16:34 ` Joseph S. Myers
  2010-12-02 21:16   ` Mike Stump
  2010-12-03  0:25   ` DJ Delorie
  2010-12-02 16:36 ` [5/9] Specs cleanup: -dynamic-linker Joseph S. Myers
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:34 UTC (permalink / raw)
  To: gcc-patches

LINK_COMMAND_SPEC (including modified copies for two targets) passes
-A, -d and -m to the linker and has further %{!A:...} specs.

This is not consistent with the semantics of -A (preprocessor assert),
-d (compiler dump) and -m (prefix to machine-specific compiler
options; if passed on its own, will get passed to cc1 then rejected by
cc1) in GCC.  Thus, this patch removes that specs handling; any such
options actually needing to be passed to the linker must be passed
using -Wl, or -Xlinker.

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

	* gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m.
	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.

diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/darwin.h gcc-mainline/gcc/config/darwin.h
--- gcc-mainline-1/gcc/config/darwin.h	2010-11-30 03:36:38.000000000 -0800
+++ gcc-mainline/gcc/config/darwin.h	2010-12-01 16:46:05.000000000 -0800
@@ -172,17 +172,17 @@ extern GTY(()) int darwin_ms_struct;
     %(linker) \
     %{flto*:%<fcompare-debug*} \
     %{flto*} \
-    %l %X %{d} %{s} %{t} %{Z} %{u*} \
-    %{A} %{e*} %{m} %{r} \
+    %l %X %{s} %{t} %{Z} %{u*} \
+    %{e*} %{r} \
     %{o*}%{!o:-o a.out} \
-    %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
+    %{!nostdlib:%{!nostartfiles:%S}} \
     %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
     %{fopenmp|ftree-parallelize-loops=*: \
       %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
     %{!nostdlib:%{!nodefaultlibs:\
       %(link_ssp) %(link_gcc_c_sequence)\
     }}\
-    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}"
+    %{!nostdlib:%{!nostartfiles:%E}} %{T*} %{F*} }}}}}}}"
 
 #define DSYMUTIL "\ndsymutil"
 
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/i386/djgpp.h gcc-mainline/gcc/config/i386/djgpp.h
--- gcc-mainline-1/gcc/config/i386/djgpp.h	2010-11-19 13:22:39.000000000 -0800
+++ gcc-mainline/gcc/config/i386/djgpp.h	2010-12-01 16:46:48.000000000 -0800
@@ -96,12 +96,12 @@ along with GCC; see the file COPYING3.  
 #undef LINK_COMMAND_SPEC
 #define LINK_COMMAND_SPEC \
 "%{!fsyntax-only: \
-%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
+%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{e*} %{N} %{n} \
 \t%{r} %{s} %{t} %{u*} %{z} %{Z}\
-\t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+\t%{!nostdlib:%{!nostartfiles:%S}}\
 \t%{static:} %{L*} %D %o\
 \t%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
-\t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
+\t%{!nostdlib:%{!nostartfiles:%E}}\
 \t-Tdjgpp.djl %{T*}}}}}}}\n\
 %{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}"
 
diff -rupN --exclude=.svn gcc-mainline-1/gcc/gcc.c gcc-mainline/gcc/gcc.c
--- gcc-mainline-1/gcc/gcc.c	2010-11-30 03:36:38.000000000 -0800
+++ gcc-mainline/gcc/gcc.c	2010-12-01 16:45:23.000000000 -0800
@@ -641,14 +641,14 @@ proper position among the other output f
     } \
     %{flto*:%<fcompare-debug*} \
     %{flto*} %l " LINK_PIE_SPEC \
-   "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
-    %{s} %{t} %{u*} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+   "%X %{o*} %{e*} %{N} %{n} %{r}\
+    %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
     %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
     %(mflib) " STACK_SPLIT_SPEC "\
     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
+    %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
 #endif
 
 #ifndef LINK_LIBGCC_SPEC

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [4/9] Specs cleanup: -ftraditional
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (3 preceding siblings ...)
  2010-12-02 16:36 ` [3/9] Specs cleanup: -n and -T for assembler Joseph S. Myers
@ 2010-12-02 16:36 ` Joseph S. Myers
  2010-12-02 16:40   ` Richard Guenther
  2010-12-02 16:36 ` [6/9] Specs cleanup: -r* for linker Joseph S. Myers
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:36 UTC (permalink / raw)
  To: gcc-patches

There are some specs that treat -ftraditional like -traditional and
-traditional-cpp.  But the option will be passed to cc1, which rejects
it even when preprocessing, so these specs are useless.  It appears
that actual support for -ftraditional as an alias of -traditional was
removed in 3.3 along with the support for -traditional compilation (as
opposed to preprocessing).  I don't think it's now useful to restore
the alias; instead, this patch removes the useless specs.

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

	* gcc.c (trad_capable_cpp, default_compilers): Don't handle
	-ftraditional.

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

	* lang-specs.h: Don't handle -ftraditional.

diff -rupN --exclude=.svn gcc-mainline-3/gcc/gcc.c gcc-mainline/gcc/gcc.c
--- gcc-mainline-3/gcc/gcc.c	2010-12-01 16:45:23.000000000 -0800
+++ gcc-mainline/gcc/gcc.c	2010-12-01 17:01:57.000000000 -0800
@@ -709,7 +709,7 @@ static const char *sysroot_hdrs_suffix_s
    call cc1 (or cc1obj in objc/lang-specs.h) from the main specs so
    that we default the front end language better.  */
 static const char *trad_capable_cpp =
-"cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}";
+"cc1 -E %{traditional|traditional-cpp:-traditional-cpp}";
 
 /* We don't wrap .d files in %W{} since a missing .d file, and
    therefore no dependency entry, confuses make into thinking a .o
@@ -903,7 +903,7 @@ static const struct compiler default_com
       external preprocessor if -save-temps is given.  */
      "%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\
       %{!E:%{!M:%{!MM:\
-          %{traditional|ftraditional:\
+          %{traditional:\
 %eGNU C no longer supports -traditional without -E}\
       %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
 	  %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
diff -rupN --exclude=.svn gcc-mainline-3/gcc/objc/lang-specs.h gcc-mainline/gcc/objc/lang-specs.h
--- gcc-mainline-3/gcc/objc/lang-specs.h	2010-11-23 04:47:58.000000000 -0800
+++ gcc-mainline/gcc/objc/lang-specs.h	2010-12-01 17:02:18.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for specs for Objective-C.
-   Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007
+   Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -24,10 +24,10 @@ along with GCC; see the file COPYING3.  
 
   {".m", "@objective-c", 0, 0, 0},
   {"@objective-c",
-     "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
+     "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
           %(cpp_options) %(cpp_debug_options)}\
       %{!E:%{!M:%{!MM:\
-	%{traditional|ftraditional|traditional-cpp:\
+	%{traditional|traditional-cpp:\
 %eGNU Objective C no longer supports traditional compilation}\
 	%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
 	    cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
@@ -35,10 +35,10 @@ along with GCC; see the file COPYING3.  
 	    cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
         %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
   {"@objective-c-header",
-     "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
+     "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
           %(cpp_options) %(cpp_debug_options)}\
       %{!E:%{!M:%{!MM:\
-	%{traditional|ftraditional|traditional-cpp:\
+	%{traditional|traditional-cpp:\
 %eGNU Objective C no longer supports traditional compilation}\
 	%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
 	    cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [5/9] Specs cleanup: -dynamic-linker
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
  2010-12-02 16:33 ` [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl, Joseph S. Myers
  2010-12-02 16:34 ` [2/9] Specs cleanup: -A, -d and -m for linker Joseph S. Myers
@ 2010-12-02 16:36 ` Joseph S. Myers
  2010-12-09 11:47   ` Ping " Joseph S. Myers
  2010-12-02 16:36 ` [3/9] Specs cleanup: -n and -T for assembler Joseph S. Myers
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:36 UTC (permalink / raw)
  To: gcc-patches

In <http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02373.html> I noted:

    There are a lot of *broken* specs for different targets of the form
    "%{!dynamic-linker:-dynamic-linker /lib/ld.so}".  These treat
    -dynamic-linker as a no-argument option whose effect is to disable the
    passing of a -dynamic-linker option to the linker.  The intended
    effect is clearly to avoid passing such an option if the user
    specified a dynamic linker explicitly - but it doesn't have that
    effect as there are no specs to pass through an explicit
    -dynamic-linker option and its argument.  Thus, all these specs should
    be simplified in a subsequent cleanup to remove the
    "%{!dynamic-linker:}" parts.

This patch effects that cleanup for all the affected specs.  The way
to pass -dynamic-linker options to the linker, that actually works,
remains use of -Wl, just as before, and options passed that way will
reliably come after, and so overrive, the default -dynamic-linker
options from LINK_SPEC.

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

	* config/alpha/freebsd.h (LINK_SPEC): Don't use
	%{!dynamic-linker:}.
	* config/alpha/linux-elf.h (LINK_SPEC): Likewise.
	* config/arm/freebsd.h (LINK_SPEC): Likewise.
	* config/arm/linux-elf.h (LINUX_TARGET_LINK_SPEC): Likewise.
	* config/bfin/linux.h (LINK_SPEC): Likewise.
	* config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Likewise.
	* config/frv/linux.h (LINK_SPEC): Likewise.
	* config/i386/freebsd.h (LINK_SPEC): Likewise.
	* config/i386/freebsd64.h (LINK_SPEC): Likewise.
	* config/i386/linux.h (LINK_SPEC): Likewise.
	* config/i386/linux64.h (LINK_SPEC): Likewise.
	* config/i386/openbsdelf.h (LINK_SPEC): Likewise.
	* config/ia64/freebsd.h (LINK_SPEC): Likewise.
	* config/ia64/linux.h (LINK_SPEC): Likewise.
	* config/lm32/uclinux-elf.h (LINK_SPEC): Likewise.
	* config/m32r/linux.h (LINK_SPEC): Likewise.
	* config/m68k/linux.h (LINK_SPEC): Likewise.
	* config/microblaze/linux.h (LINK_SPEC): Likewise.
	* config/mips/linux.h (LINK_SPEC): Likewise.
	* config/mips/linux64.h (LINK_SPEC): Likewise.
	* config/mips/openbsd.h (LINK_SPEC): Likewise.
	* config/mn10300/linux.h (LINK_SPEC): Likewise.
	* config/netbsd-elf.h (LINK_SPEC): Likewise.
	* config/pa/pa-linux.h (LINK_SPEC): Likewise.
	* config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32,
	LINK_OS_LINUX_SPEC64): Likewise.
	* config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC,
	LINK_OS_LINUX_SPEC, LINK_OS_GNU_SPEC, LINK_OS_NETBSD_SPEC):
	Likewise.
	* config/s390/linux.h (LINK_SPEC): Likewise.
	* config/sh/linux.h (SUBTARGET_LINK_SPEC): Likewise.
	* config/sparc/freebsd.h (LINK_SPEC): Likewise.
	* config/sparc/linux.h (LINK_SPEC): Likewise.
	* config/sparc/linux64.h (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
	LINK_SPEC): Likewise.
	* config/sparc/openbsd64.h (LINK_SPEC): Likewise.
	* config/vax/linux.h (LINK_SPEC): Likewise.
	* config/xtensa/linux.h (LINK_SPEC): Likewise.

diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/alpha/freebsd.h gcc-mainline/gcc/config/alpha/freebsd.h
--- gcc-mainline-4/gcc/config/alpha/freebsd.h	2010-12-01 16:23:35.000000000 -0800
+++ gcc-mainline/gcc/config/alpha/freebsd.h	2010-12-01 17:09:15.000000000 -0800
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3.  
   %{!shared:								\
     %{!static:								\
       %{rdynamic:-export-dynamic}					\
-      %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }}	\
+      -dynamic-linker %(fbsd_dynamic_linker) }	\
     %{static:-Bstatic}}							\
   %{symbolic:-Bsymbolic}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/alpha/linux-elf.h gcc-mainline/gcc/config/alpha/linux-elf.h
--- gcc-mainline-4/gcc/config/alpha/linux-elf.h	2010-05-27 13:13:54.000000000 -0700
+++ gcc-mainline/gcc/config/alpha/linux-elf.h	2010-12-01 17:11:56.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler
    for Alpha Linux-based GNU systems using ELF.
-   Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2006, 2007
+   Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2006, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Richard Henderson.
 
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  
   %{!shared:							\
     %{!static:							\
       %{rdynamic:-export-dynamic}				\
-      %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}}	\
+      -dynamic-linker %(elf_dynamic_linker)}	\
     %{static:-static}}"
 
 #undef LIB_SPEC
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/arm/freebsd.h gcc-mainline/gcc/config/arm/freebsd.h
--- gcc-mainline-4/gcc/config/arm/freebsd.h	2010-11-10 15:24:03.000000000 -0800
+++ gcc-mainline/gcc/config/arm/freebsd.h	2010-12-01 17:09:15.000000000 -0800
@@ -35,7 +35,7 @@
   %{!shared:								\
     %{!static:								\
       %{rdynamic:-export-dynamic}					\
-      %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }}	\
+      -dynamic-linker %(fbsd_dynamic_linker) }	\
     %{static:-Bstatic}}							\
   %{symbolic:-Bsymbolic}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/arm/linux-elf.h gcc-mainline/gcc/config/arm/linux-elf.h
--- gcc-mainline-4/gcc/config/arm/linux-elf.h	2009-12-30 09:05:39.000000000 -0800
+++ gcc-mainline/gcc/config/arm/linux-elf.h	2010-12-01 17:12:25.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions for ARM running Linux-based GNU systems using ELF
    Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008
+   2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Philip Blundell <philb@gnu.org>
 
@@ -70,7 +70,7 @@
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
    %{rdynamic:-export-dynamic} \
-   %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
+   -dynamic-linker " LINUX_DYNAMIC_LINKER " \
    -X \
    %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
    SUBTARGET_EXTRA_LINK_SPEC
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/bfin/linux.h gcc-mainline/gcc/config/bfin/linux.h
--- gcc-mainline-4/gcc/config/bfin/linux.h	2009-10-07 09:35:30.000000000 -0700
+++ gcc-mainline/gcc/config/bfin/linux.h	2010-12-01 17:12:47.000000000 -0800
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -45,7 +45,7 @@ see the files COPYING3 and COPYING.RUNTI
   %{shared:-G -Bdynamic} \
   %{!shared: %{!static: \
    %{rdynamic:-export-dynamic} \
-   %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+   -dynamic-linker /lib/ld-uClibc.so.0} \
    %{static}} -init __init -fini __fini"
 
 #define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h"
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/cris/linux.h gcc-mainline/gcc/config/cris/linux.h
--- gcc-mainline-4/gcc/config/cris/linux.h	2009-03-28 00:38:23.000000000 -0700
+++ gcc-mainline/gcc/config/cris/linux.h	2010-12-01 17:13:26.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for GCC.  Part of the machine description for CRIS.
-   Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008
+   Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
 
@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3.  
   %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
   %{!shared:%{!static:\
               %{rdynamic:-export-dynamic}\
-              %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}\
+              -dynamic-linker " LINUX_DYNAMIC_LINKER "}}\
   %{!r:%{O2|O3: --gc-sections}}"
 
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/frv/linux.h gcc-mainline/gcc/config/frv/linux.h
--- gcc-mainline-4/gcc/config/frv/linux.h	2009-03-28 00:38:00.000000000 -0700
+++ gcc-mainline/gcc/config/frv/linux.h	2010-12-01 17:13:44.000000000 -0800
@@ -1,5 +1,5 @@
 /* Target macros for the FRV Linux port of GCC.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Red Hat Inc.
 
@@ -42,7 +42,7 @@
   %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
   %{!shared: %{!static: \
    %{rdynamic:-export-dynamic} \
-   %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+   -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
    %{static}}"
 
 /* Support for compile-time default CPU.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/freebsd.h gcc-mainline/gcc/config/i386/freebsd.h
--- gcc-mainline-4/gcc/config/i386/freebsd.h	2010-11-10 15:24:02.000000000 -0800
+++ gcc-mainline/gcc/config/i386/freebsd.h	2010-12-01 17:09:15.000000000 -0800
@@ -108,7 +108,7 @@ along with GCC; see the file COPYING3.  
     %{!shared: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
+        -dynamic-linker %(fbsd_dynamic_linker) } \
     %{static:-Bstatic}} \
   %{symbolic:-Bsymbolic}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/freebsd64.h gcc-mainline/gcc/config/i386/freebsd64.h
--- gcc-mainline-4/gcc/config/i386/freebsd64.h	2009-03-28 00:38:14.000000000 -0700
+++ gcc-mainline/gcc/config/i386/freebsd64.h	2010-12-01 17:14:06.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for AMD x86-64 running FreeBSD with ELF format
-   Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2007, 2010 Free Software Foundation, Inc.
    Contributed by David O'Brien <obrien@FreeBSD.org>
 
 This file is part of GCC.
@@ -38,6 +38,6 @@ along with GCC; see the file COPYING3.  
     %{!shared: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
+	-dynamic-linker %(fbsd_dynamic_linker) } \
     %{static:-Bstatic}} \
   %{symbolic:-Bsymbolic}"
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h
--- gcc-mainline-4/gcc/config/i386/linux.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux.h	2010-12-01 17:09:15.000000000 -0800
@@ -117,7 +117,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
+	-dynamic-linker %(dynamic_linker)} \
 	%{static:-static}}}"
 
 /* Similar to standard Linux, but adding -ffast-math support.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/linux64.h gcc-mainline/gcc/config/i386/linux64.h
--- gcc-mainline-4/gcc/config/i386/linux64.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux64.h	2010-12-01 17:09:15.000000000 -0800
@@ -80,8 +80,8 @@ see the files COPYING3 and COPYING.RUNTI
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{" SPEC_32 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
-      %{" SPEC_64 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \
+      %{" SPEC_32 ":-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
+      %{" SPEC_64 ":-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
     %{static:-static}}"
 
 /* Similar to standard Linux, but adding -ffast-math support.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/openbsdelf.h gcc-mainline/gcc/config/i386/openbsdelf.h
--- gcc-mainline-4/gcc/config/i386/openbsdelf.h	2009-10-07 09:35:28.000000000 -0700
+++ gcc-mainline/gcc/config/i386/openbsdelf.h	2010-12-01 17:14:42.000000000 -0800
@@ -1,6 +1,6 @@
 /* Configuration for an OpenBSD i386 target.
    
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -129,6 +129,6 @@ along with GCC; see the file COPYING3.  
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
    %{assert*} \
-   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+   -dynamic-linker /usr/libexec/ld.so"
 
 #define OBSD_HAS_CORRECT_SPECS
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/ia64/freebsd.h gcc-mainline/gcc/config/ia64/freebsd.h
--- gcc-mainline-4/gcc/config/ia64/freebsd.h	2010-11-10 15:24:03.000000000 -0800
+++ gcc-mainline/gcc/config/ia64/freebsd.h	2010-12-01 17:09:15.000000000 -0800
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  
   %{!shared:								\
     %{!static:								\
       %{rdynamic:-export-dynamic}					\
-      %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }}	\
+      -dynamic-linker %(fbsd_dynamic_linker) }	\
     %{static:-Bstatic}}"
 
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/ia64/linux.h gcc-mainline/gcc/config/ia64/linux.h
--- gcc-mainline-4/gcc/config/ia64/linux.h	2009-04-24 16:20:51.000000000 -0700
+++ gcc-mainline/gcc/config/ia64/linux.h	2010-12-01 17:14:58.000000000 -0800
@@ -1,7 +1,7 @@
 /* Definitions for ia64-linux target.
 
 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006,
-2009 Free Software Foundation, Inc.
+2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -69,7 +69,7 @@ do {						\
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+      -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
       %{static:-static}}"
 
 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/lm32/uclinux-elf.h gcc-mainline/gcc/config/lm32/uclinux-elf.h
--- gcc-mainline-4/gcc/config/lm32/uclinux-elf.h	2010-12-01 16:24:40.000000000 -0800
+++ gcc-mainline/gcc/config/lm32/uclinux-elf.h	2010-12-01 17:09:15.000000000 -0800
@@ -73,7 +73,7 @@
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
    %{rdynamic:-export-dynamic} \
-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
+   -dynamic-linker /lib/ld-linux.so.2"
 
 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/m32r/linux.h gcc-mainline/gcc/config/m32r/linux.h
--- gcc-mainline-4/gcc/config/m32r/linux.h	2010-11-19 13:25:32.000000000 -0800
+++ gcc-mainline/gcc/config/m32r/linux.h	2010-12-01 17:09:15.000000000 -0800
@@ -63,7 +63,7 @@
     %{!ibcs: \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+	-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
 	%{static:-static}}}"
 #else
 #define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \
@@ -71,7 +71,7 @@
     %{!ibcs: \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+	-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
 	%{static:-static}}}"
 #endif
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-4/gcc/config/m68k/linux.h	2010-12-01 16:53:30.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h	2010-12-01 17:10:16.000000000 -0800
@@ -91,7 +91,7 @@ along with GCC; see the file COPYING3.  
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker*:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+      -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
     %{static}}"
 
 /* For compatibility with linux/a.out */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/microblaze/linux.h gcc-mainline/gcc/config/microblaze/linux.h
--- gcc-mainline-4/gcc/config/microblaze/linux.h	2010-10-04 04:47:05.000000000 -0700
+++ gcc-mainline/gcc/config/microblaze/linux.h	2010-12-01 17:09:16.000000000 -0800
@@ -30,6 +30,6 @@
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
+      -dynamic-linker %(dynamic_linker)} \
     %{static:-static}}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux.h gcc-mainline/gcc/config/mips/linux.h
--- gcc-mainline-4/gcc/config/mips/linux.h	2010-06-16 09:07:32.000000000 -0700
+++ gcc-mainline/gcc/config/mips/linux.h	2010-12-01 17:15:46.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions for MIPS running Linux-based GNU systems with ELF format.
    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -75,7 +75,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
         %{static:-static}}}"
 
 #undef SUBTARGET_ASM_SPEC
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux64.h gcc-mainline/gcc/config/mips/linux64.h
--- gcc-mainline-4/gcc/config/mips/linux64.h	2010-06-16 09:07:32.000000000 -0700
+++ gcc-mainline/gcc/config/mips/linux64.h	2010-12-01 17:16:01.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions for MIPS running Linux-based GNU systems with ELF format
    using n32/64 abi.
-   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -54,10 +54,9 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker: \
-	  %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \
-	  %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
-	  %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}} \
+	%{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \
+	%{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
+	%{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
       %{static:-static}}} \
 %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
 %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/openbsd.h gcc-mainline/gcc/config/mips/openbsd.h
--- gcc-mainline-4/gcc/config/mips/openbsd.h	2009-10-07 09:35:30.000000000 -0700
+++ gcc-mainline/gcc/config/mips/openbsd.h	2010-12-01 17:16:19.000000000 -0800
@@ -1,5 +1,6 @@
 /* Configuration for  a MIPS ABI32 OpenBSD target.
-   Copyright (C) 1999, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003, 2004, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -81,7 +82,7 @@ along with GCC; see the file COPYING3.  
    %{bestGnum} %{shared} %{non_shared} \
    %{call_shared} %{no_archive} %{exact_version} \
    %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
-   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
+   -dynamic-linker /usr/libexec/ld.so \
    %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp \
    %{static:-Bstatic} %{!static:-Bdynamic} %{assert*}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mn10300/linux.h gcc-mainline/gcc/config/mn10300/linux.h
--- gcc-mainline-4/gcc/config/mn10300/linux.h	2010-12-01 16:25:44.000000000 -0800
+++ gcc-mainline/gcc/config/mn10300/linux.h	2010-12-01 17:09:16.000000000 -0800
@@ -38,7 +38,7 @@
 #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
    %{!static: \
      %{rdynamic:-export-dynamic} \
-     %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+     -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
    %{static:-static}"
 
 #undef  PROCESSOR_DEFAULT
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/netbsd-elf.h gcc-mainline/gcc/config/netbsd-elf.h
--- gcc-mainline-4/gcc/config/netbsd-elf.h	2010-10-24 09:33:31.000000000 -0700
+++ gcc-mainline/gcc/config/netbsd-elf.h	2010-12-01 17:09:15.000000000 -0800
@@ -77,7 +77,7 @@ along with GCC; see the file COPYING3.  
 	 %{!e*:-e %(netbsd_entry_point)}}} \
      %{!static: \
        %{rdynamic:-export-dynamic} \
-       %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+       -dynamic-linker /usr/libexec/ld.elf_so} \
      %{static:-static}}"
 
 /* Use --as-needed -lgcc_s for eh support.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/pa/pa-linux.h gcc-mainline/gcc/config/pa/pa-linux.h
--- gcc-mainline-4/gcc/config/pa/pa-linux.h	2010-12-01 16:53:39.000000000 -0800
+++ gcc-mainline/gcc/config/pa/pa-linux.h	2010-12-01 17:09:16.000000000 -0800
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3.  
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+      -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
       %{static:-static}}"
 
 /* glibc's profiling functions don't need gcc to allocate counters.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/rs6000/linux64.h gcc-mainline/gcc/config/rs6000/linux64.h
--- gcc-mainline-4/gcc/config/rs6000/linux64.h	2010-12-01 16:53:56.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/linux64.h	2010-12-01 17:09:16.000000000 -0800
@@ -392,11 +392,11 @@ extern int dot_symbols;
 
 #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
+  -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}"
 
 #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"
+  -dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}"
 
 #undef  TOC_SECTION_ASM_OP
 #define TOC_SECTION_ASM_OP \
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/rs6000/sysv4.h gcc-mainline/gcc/config/rs6000/sysv4.h
--- gcc-mainline-4/gcc/config/rs6000/sysv4.h	2010-12-01 16:27:00.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/sysv4.h	2010-12-01 17:09:16.000000000 -0800
@@ -834,7 +834,7 @@ SVR4_ASM_SPEC \
   %{!shared: \
     %{!static: \
       %{rdynamic: -export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
+      -dynamic-linker %(fbsd_dynamic_linker) } \
     %{static:-Bstatic}} \
   %{symbolic:-Bsymbolic}"
 
@@ -875,7 +875,7 @@ SVR4_ASM_SPEC \
 
 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
+  -dynamic-linker " LINUX_DYNAMIC_LINKER "}}"
 
 #if defined(HAVE_LD_EH_FRAME_HDR)
 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
@@ -906,7 +906,7 @@ SVR4_ASM_SPEC \
 
 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+  -dynamic-linker /lib/ld.so.1}}"
 
 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__	\
 %{!undef:					                \
@@ -931,7 +931,7 @@ ncrtn.o%s"
 #define LINK_OS_NETBSD_SPEC "\
 %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
-  %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}"
+  -dynamic-linker /usr/libexec/ld.elf_so}}"
 
 #define CPP_OS_NETBSD_SPEC "\
 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/s390/linux.h gcc-mainline/gcc/config/s390/linux.h
--- gcc-mainline-4/gcc/config/s390/linux.h	2009-03-28 00:38:01.000000000 -0700
+++ gcc-mainline/gcc/config/s390/linux.h	2010-12-01 17:17:13.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for Linux for S/390.
-   Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
+   Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Hartmut Penner (hpenner@de.ibm.com) and
                   Ulrich Weigand (uweigand@de.ibm.com).
@@ -83,9 +83,8 @@ along with GCC; see the file COPYING3.  
       %{static:-static} \
       %{!static: \
 	%{rdynamic:-export-dynamic} \
-	%{!dynamic-linker: \
-          %{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
-          %{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}}"
+	%{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
+	%{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"
 
 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sh/linux.h gcc-mainline/gcc/config/sh/linux.h
--- gcc-mainline-4/gcc/config/sh/linux.h	2009-03-28 00:38:19.000000000 -0700
+++ gcc-mainline/gcc/config/sh/linux.h	2010-12-01 17:17:30.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for SH running Linux-based GNU systems using ELF
-   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
 
@@ -56,7 +56,7 @@ along with GCC; see the file COPYING3.  
   "%{shared:-shared} \
    %{!static: \
      %{rdynamic:-export-dynamic} \
-     %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+     -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
    %{static:-static}"
 
 /* Output assembler code to STREAM to call the profiler.  */
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/freebsd.h gcc-mainline/gcc/config/sparc/freebsd.h
--- gcc-mainline-4/gcc/config/sparc/freebsd.h	2010-11-10 15:24:02.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/freebsd.h	2010-12-01 17:09:16.000000000 -0800
@@ -39,7 +39,7 @@ along with GCC; see the file COPYING3.  
   %{!shared:								\
     %{!static:								\
       %{rdynamic:-export-dynamic}					\
-      %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }}	\
+      -dynamic-linker %(fbsd_dynamic_linker) }	\
     %{static:-Bstatic}}"
 
 
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
--- gcc-mainline-4/gcc/config/sparc/linux.h	2010-12-01 16:54:16.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux.h	2010-12-01 17:09:16.000000000 -0800
@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
         %{static:-static}}}"
 
 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
--- gcc-mainline-4/gcc/config/sparc/linux64.h	2010-12-01 16:54:26.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux64.h	2010-12-01 17:09:16.000000000 -0800
@@ -126,7 +126,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
         %{static:-static}}} \
 "
 
@@ -135,7 +135,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
         %{static:-static}}} \
 "
 
@@ -216,7 +216,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
         %{static:-static}}} \
 %{mlittle-endian:-EL} \
 %{!mno-relax:%{!r:-relax}} \
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/openbsd64.h gcc-mainline/gcc/config/sparc/openbsd64.h
--- gcc-mainline-4/gcc/config/sparc/openbsd64.h	2009-03-28 00:38:07.000000000 -0700
+++ gcc-mainline/gcc/config/sparc/openbsd64.h	2010-12-01 17:18:01.000000000 -0800
@@ -1,5 +1,5 @@
 /* Configuration file for sparc64 OpenBSD target.
-   Copyright (C) 1999, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2005, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -77,7 +77,7 @@ along with GCC; see the file COPYING3.  
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
    %{assert*} \
-   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+   -dynamic-linker /usr/libexec/ld.so"
 
 /* As an elf system, we need crtbegin/crtend stuff.  */
 #undef STARTFILE_SPEC
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/vax/linux.h gcc-mainline/gcc/config/vax/linux.h
--- gcc-mainline-4/gcc/config/vax/linux.h	2009-12-30 09:05:41.000000000 -0800
+++ gcc-mainline/gcc/config/vax/linux.h	2010-12-01 17:18:12.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for VAX running Linux-based GNU systems with ELF format.
-   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -44,5 +44,5 @@ along with GCC; see the file COPYING3.  
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+      -dynamic-linker /lib/ld.so.1} \
     %{static:-static}}"
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/xtensa/linux.h gcc-mainline/gcc/config/xtensa/linux.h
--- gcc-mainline-4/gcc/config/xtensa/linux.h	2009-03-28 00:38:21.000000000 -0700
+++ gcc-mainline/gcc/config/xtensa/linux.h	2010-12-01 17:18:28.000000000 -0800
@@ -1,6 +1,6 @@
 /* Xtensa Linux configuration.
    Derived from the configuration for GCC for Intel i386 running Linux.
-   Copyright (C) 2001, 2002, 2003, 2006, 2007, 2008
+   Copyright (C) 2001, 2002, 2003, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -52,7 +52,7 @@ along with GCC; see the file COPYING3.  
     %{!ibcs: \
       %{!static: \
         %{rdynamic:-export-dynamic} \
-        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
+        -dynamic-linker " LINUX_DYNAMIC_LINKER "} \
       %{static:-static}}}"
 
 #undef LOCAL_LABEL_PREFIX

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [6/9] Specs cleanup: -r* for linker
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (4 preceding siblings ...)
  2010-12-02 16:36 ` [4/9] Specs cleanup: -ftraditional Joseph S. Myers
@ 2010-12-02 16:36 ` Joseph S. Myers
  2010-12-09 11:57   ` Ping " Joseph S. Myers
  2010-12-02 16:37 ` [9/9] Specs cleanup: -b Joseph S. Myers
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:36 UTC (permalink / raw)
  To: gcc-patches

Some linker specs do %{!r*:...}.  The contents appear to be setting an
entry point - that is, something it is indeed appropriate to disable
for -r (relocatable link).  But -r is an option with no argument and
it is not appropriate to catch other options such as -rdynamic here.
This patch restricts those specs to catching -r only.

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

	* config/i386/openbsdelf.h (LINK_SPEC): Use %{r:} not %{r*:}.
	* config/mips/openbsd.h (LINK_SPEC): Use %{r:} not %{r*:}.
	* config/netbsd-aout.h (NETBSD_LINK_SPEC_AOUT): Use %{r:} not
	%{r*:}.
	* config/netbsd-elf.h (NETBSD_LINK_SPEC_ELF): Use %{r:} not
	%{r*:}.
	* config/sparc/openbsd64.h (LINK_SPEC): Use %{r:} not %{r*:}.
	* config/vax/netbsd-elf.h (LINK_SPEC): Use %{r:} not %{r*:}.

diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/i386/openbsdelf.h gcc-mainline/gcc/config/i386/openbsdelf.h
--- gcc-mainline-5/gcc/config/i386/openbsdelf.h	2010-12-01 17:33:46.000000000 -0800
+++ gcc-mainline/gcc/config/i386/openbsdelf.h	2010-12-01 17:28:57.000000000 -0800
@@ -124,7 +124,7 @@ along with GCC; see the file COPYING3.  
 
 #undef LINK_SPEC
 #define LINK_SPEC \
-  "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+  "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
    %{shared:-shared} %{R*} \
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/mips/openbsd.h gcc-mainline/gcc/config/mips/openbsd.h
--- gcc-mainline-5/gcc/config/mips/openbsd.h	2010-12-01 17:33:46.000000000 -0800
+++ gcc-mainline/gcc/config/mips/openbsd.h	2010-12-01 17:29:12.000000000 -0800
@@ -83,7 +83,7 @@ along with GCC; see the file COPYING3.  
    %{call_shared} %{no_archive} %{exact_version} \
    %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
    -dynamic-linker /usr/libexec/ld.so \
-   %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp \
+   %{!nostdlib:%{!r:%{!e*:-e __start}}} -dc -dp \
    %{static:-Bstatic} %{!static:-Bdynamic} %{assert*}"
 
 /* -G is incompatible with -KPIC which is the default, so only allow objects
diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/netbsd-aout.h gcc-mainline/gcc/config/netbsd-aout.h
--- gcc-mainline-5/gcc/config/netbsd-aout.h	2010-10-24 09:33:03.000000000 -0700
+++ gcc-mainline/gcc/config/netbsd-aout.h	2010-12-01 17:28:17.000000000 -0800
@@ -57,7 +57,7 @@ along with GCC; see the file COPYING3.  
   "%{nostdlib:-nostdlib}		\
    %{!shared:				\
      %{!nostdlib:			\
-       %{!r*:				\
+       %{!r:				\
 	 %{!e*:-e start}}}		\
      -dc -dp				\
      %{static:-Bstatic}}		\
diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/netbsd-elf.h gcc-mainline/gcc/config/netbsd-elf.h
--- gcc-mainline-5/gcc/config/netbsd-elf.h	2010-12-01 17:33:46.000000000 -0800
+++ gcc-mainline/gcc/config/netbsd-elf.h	2010-12-01 17:28:26.000000000 -0800
@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3.  
    %{!shared: \
      -dc -dp \
      %{!nostdlib: \
-       %{!r*: \
+       %{!r: \
 	 %{!e*:-e %(netbsd_entry_point)}}} \
      %{!static: \
        %{rdynamic:-export-dynamic} \
diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/sparc/openbsd64.h gcc-mainline/gcc/config/sparc/openbsd64.h
--- gcc-mainline-5/gcc/config/sparc/openbsd64.h	2010-12-01 17:33:46.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/openbsd64.h	2010-12-01 17:29:28.000000000 -0800
@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3.  
 
 #undef LINK_SPEC
 #define LINK_SPEC \
-  "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+  "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
    %{shared:-shared} %{R*} \
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
diff -rupN --exclude=.svn gcc-mainline-5/gcc/config/vax/netbsd-elf.h gcc-mainline/gcc/config/vax/netbsd-elf.h
--- gcc-mainline-5/gcc/config/vax/netbsd-elf.h	2009-10-07 09:35:30.000000000 -0700
+++ gcc-mainline/gcc/config/vax/netbsd-elf.h	2010-12-01 17:29:44.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for NetBSD/vax ELF systems.
-   Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -52,7 +52,7 @@ along with GCC; see the file COPYING3.  
    %{!shared: \
      -dc -dp \
      %{!nostdlib: \
-       %{!r*: \
+       %{!r: \
 	 %{!e*:-e %(netbsd_entry_point)}}} \
      %{!static:-static} \
      %{static:-static}}"

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [3/9] Specs cleanup: -n and -T for assembler
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (2 preceding siblings ...)
  2010-12-02 16:36 ` [5/9] Specs cleanup: -dynamic-linker Joseph S. Myers
@ 2010-12-02 16:36 ` Joseph S. Myers
  2010-12-09 11:30   ` Ping " Joseph S. Myers
  2010-12-02 16:36 ` [4/9] Specs cleanup: -ftraditional Joseph S. Myers
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:36 UTC (permalink / raw)
  To: gcc-patches

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.

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

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [9/9] Specs cleanup: -b
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (5 preceding siblings ...)
  2010-12-02 16:36 ` [6/9] Specs cleanup: -r* for linker Joseph S. Myers
@ 2010-12-02 16:37 ` Joseph S. Myers
  2010-12-02 16:48   ` Richard Guenther
  2010-12-02 16:37 ` [8/9] Specs cleanup: -V Joseph S. Myers
  2010-12-02 16:37 ` [7/9] Specs cleanup: -v for assembler Joseph S. Myers
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:37 UTC (permalink / raw)
  To: gcc-patches

Until it was removed, -b was a GCC option to cause the driver to run
GCC for a different target.  It was never handled by specs and since it
was removed it's best that it gives an error as an unknown option.
This patch removes it from various specs that would have passed it to
the linker.

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

	* config/bfin/bfin.h (LINK_SPEC): Remove %{b}.
	* config/frv/frv.h (LINK_SPEC): Remove %{b}.
	* config/i386/netware.h (LINK_SPEC): Remove %{b}.
	* config/i386/nto.h (LINK_SPEC): Remove %{b}.
	* config/lm32/uclinux-elf.h (LINK_SPEC): Remove %{b}.
	* config/sol2.h (LINK_SPEC): Remove %{b}.
	* config/svr4.h (LINK_SPEC): Remove %{b}.

diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/bfin/bfin.h gcc-mainline/gcc/config/bfin/bfin.h
--- gcc-mainline-8/gcc/config/bfin/bfin.h	2010-12-01 17:40:18.000000000 -0800
+++ gcc-mainline/gcc/config/bfin/bfin.h	2010-12-01 18:08:02.000000000 -0800
@@ -253,7 +253,6 @@ extern unsigned int bfin_workarounds;
 
 #define LINK_SPEC "\
 %{h*} %{v:-V} \
-%{b} \
 %{mfdpic:-melf32bfinfd -z text} \
 %{static:-dn -Bstatic} \
 %{shared:-G -Bdynamic} \
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/frv/frv.h gcc-mainline/gcc/config/frv/frv.h
--- gcc-mainline-8/gcc/config/frv/frv.h	2010-12-01 17:40:54.000000000 -0800
+++ gcc-mainline/gcc/config/frv/frv.h	2010-12-01 18:08:13.000000000 -0800
@@ -160,7 +160,6 @@
 #undef	LINK_SPEC
 #define LINK_SPEC "\
 %{h*} %{v:-V} \
-%{b} \
 %{mfdpic:-melf32frvfd -z text} \
 %{static:-dn -Bstatic} \
 %{shared:-Bdynamic} \
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/i386/netware.h gcc-mainline/gcc/config/i386/netware.h
--- gcc-mainline-8/gcc/config/i386/netware.h	2010-12-01 17:58:33.000000000 -0800
+++ gcc-mainline/gcc/config/i386/netware.h	2010-12-01 18:08:24.000000000 -0800
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.  
 /* Kinda useless, but what the hell */
 #undef	LINK_SPEC
 #define LINK_SPEC "%{h*} %{v:-V} \
-		   %{b} \
 		   %{Qy:} %{!Qn:-Qy}"
 
 #undef	STARTFILE_SPEC
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/i386/nto.h gcc-mainline/gcc/config/i386/nto.h
--- gcc-mainline-8/gcc/config/i386/nto.h	2010-10-08 08:19:51.000000000 -0700
+++ gcc-mainline/gcc/config/i386/nto.h	2010-12-01 18:08:58.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions for Intel 386 running QNX/Neutrino.
-   Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -64,7 +64,6 @@ crti.o%s \
 #undef LINK_SPEC
 #define LINK_SPEC \
   "%{h*} %{v:-V} \
-   %{b} \
    %{static:-dn -Bstatic} \
    %{shared:-G -dy -z text} \
    %{symbolic:-Bsymbolic -G -dy -z text} \
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/lm32/uclinux-elf.h gcc-mainline/gcc/config/lm32/uclinux-elf.h
--- gcc-mainline-8/gcc/config/lm32/uclinux-elf.h	2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/lm32/uclinux-elf.h	2010-12-01 18:09:19.000000000 -0800
@@ -68,7 +68,6 @@
 
 #undef  LINK_SPEC
 #define LINK_SPEC "%{h*} %{version:-v} \
-   %{b} \
    %{static:-Bstatic} \
    %{shared:-shared} \
    %{symbolic:-Bsymbolic} \
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/sol2.h gcc-mainline/gcc/config/sol2.h
--- gcc-mainline-8/gcc/config/sol2.h	2010-12-01 16:52:05.000000000 -0800
+++ gcc-mainline/gcc/config/sol2.h	2010-12-01 18:07:45.000000000 -0800
@@ -175,7 +175,6 @@ along with GCC; see the file COPYING3.  
 #undef  LINK_SPEC
 #define LINK_SPEC \
   "%{h*} %{v:-V} \
-   %{b} \
    %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
    %{static:-dn -Bstatic} \
    %{shared:-G -dy %{!mimpure-text:-z text}} \
diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
--- gcc-mainline-8/gcc/config/svr4.h	2010-12-01 17:38:50.000000000 -0800
+++ gcc-mainline/gcc/config/svr4.h	2010-12-01 18:10:46.000000000 -0800
@@ -112,7 +112,7 @@ see the files COPYING3 and COPYING.RUNTI
    support here for as many of the other svr4 linker options as seems
    reasonable, given that some of them conflict with options for other
    svr4 tools (e.g. the assembler).  In particular, we do support the
-   -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
+   -z*, -V, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
    -o*, -r, -s, -u*, and -L* options are directly supported by gcc.c
    itself.  We don't directly support the -m (generate load map)
    option because that conflicts with the -m (run m4) option of the
@@ -131,7 +131,6 @@ see the files COPYING3 and COPYING.RUNTI
 #undef	LINK_SPEC
 #ifdef CROSS_DIRECTORY_STRUCTURE
 #define LINK_SPEC "%{h*} %{v:-V} \
-		   %{b} \
 		   %{static:-dn -Bstatic} \
 		   %{shared:-G -dy -z text} \
 		   %{symbolic:-Bsymbolic -G -dy -z text} \
@@ -140,7 +139,6 @@ see the files COPYING3 and COPYING.RUNTI
 		   %{Qy:} %{!Qn:-Qy}"
 #else
 #define LINK_SPEC "%{h*} %{v:-V} \
-		   %{b} \
 		   %{static:-dn -Bstatic} \
 		   %{shared:-G -dy -z text} \
 		   %{symbolic:-Bsymbolic -G -dy -z text} \

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [7/9] Specs cleanup: -v for assembler
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (7 preceding siblings ...)
  2010-12-02 16:37 ` [8/9] Specs cleanup: -V Joseph S. Myers
@ 2010-12-02 16:37 ` Joseph S. Myers
  2010-12-09 12:07   ` Ping " Joseph S. Myers
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:37 UTC (permalink / raw)
  To: gcc-patches

The driver -v option is always converted to an assembler -v option for
the GNU assembler through a spec in asm_options.  Thus, there is never
any need for %{v} or %{v:-v} or %{v:-V} in ASM_SPEC for the GNU
assembler.  This patch removes such specs where I believe that only
the GNU assembler will be used for the specs in question.

Cases where the same spec also mishandles -V as a GCC option are
covered in patch 8.

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

	* config/arc/arc.h (ASM_SPEC): Remove %{v}.
	* config/bfin/bfin.h (ASM_SPEC): Remove %{v}.
	* config/cris/cris.h (ASM_SPEC): Remove %{v:-v}.
	* config/fr30/fr30.h (ASM_SPEC): Remove %{v}.
	* config/frv/frv.h (ASM_SPEC): Remove %{v}.
	* config/i386/linux.h (ASM_SPEC): Remove %{v}.
	* config/i386/linux64.h (ASM_SPEC): Remove %{v}.
	* config/i386/mingw-w64.h (ASM_SPEC): Remove %{v}.
	* config/i386/sol2-10.h (ASM_SPEC): Remove %{v}.
	* config/i386/vxworks.h (ASM_SPEC): Remove %{v}.
	* config/i386/x86-64.h (ASM_SPEC): Remove %{v}.
	* config/lm32/lm32.h (ASM_SPEC): Remove %{v}.
	* config/m32r/m32r.h (ASM_SPEC): Remove %{v}.
	* config/m68k/linux.h (ASM_SPEC): Remove %{v:-V}.
	* config/microblaze/microblaze.h (ASM_SPEC): Remove %{v}.
	* config/mips/mips.h (ASM_SPEC): Remove %{v}.
	* config/mips/vxworks.h (ASM_SPEC): Remove %{v}.
	* config/pa/pa-linux.h (ASM_SPEC): Remove %{v:-V}.
	* config/rs6000/freebsd.h (SVR4_ASM_SPEC): Remove %{v}.
	* config/rs6000/linux64.h (ASM_SPEC): Remove %{v:-V}.
	* config/rs6000/vxworks.h (ASM_SPEC): Remove %{v:-v}.
	* config/sparc/openbsd64.h (ASM_SPEC): Remove %{v:-V}.
	* config/svr4.h (SVR4_ASM_SPEC): Remove %{v:-V}.
	* config/xtensa/elf.h (ASM_SPEC): Remove %{v}.
	* config/xtensa/linux.h (ASM_SPEC): Remove %{v}.

diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/arc/arc.h gcc-mainline/gcc/config/arc/arc.h
--- gcc-mainline-6/gcc/config/arc/arc.h	2010-11-22 05:28:25.000000000 -0800
+++ gcc-mainline/gcc/config/arc/arc.h	2010-12-01 17:39:58.000000000 -0800
@@ -62,7 +62,7 @@ along with GCC; see the file COPYING3.  
 %{EB:-mbig-endian} %{EL:-mlittle-endian} \
 "
 
-#define ASM_SPEC "%{v} %{EB} %{EL}"
+#define ASM_SPEC "%{EB} %{EL}"
 
 #define LINK_SPEC "%{v} %{EB} %{EL}"
 
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/bfin/bfin.h gcc-mainline/gcc/config/bfin/bfin.h
--- gcc-mainline-6/gcc/config/bfin/bfin.h	2010-12-01 16:52:22.000000000 -0800
+++ gcc-mainline/gcc/config/bfin/bfin.h	2010-12-01 17:40:18.000000000 -0800
@@ -248,7 +248,7 @@ extern unsigned int bfin_workarounds;
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{v} %{Ym,*} %{Yd,*} \
+%{Ym,*} %{Yd,*} \
     %{mno-fdpic:-mnopic} %{mfdpic}"
 
 #define LINK_SPEC "\
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/cris/cris.h gcc-mainline/gcc/config/cris/cris.h
--- gcc-mainline-6/gcc/config/cris/cris.h	2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/cris/cris.h	2010-12-01 17:49:52.000000000 -0800
@@ -192,8 +192,7 @@ extern int cris_cpu_version;
 #undef ASM_SPEC
 #define ASM_SPEC \
  MAYBE_AS_NO_MUL_BUG_ABORT \
- "%{v:-v}\
- %(asm_subtarget)\
+ "%(asm_subtarget)\
  %{march=*:%{cpu=*:%edo not specify both -march=... and -mcpu=...}}\
  %{march=v32:--march=v32} %{mcpu=v32:--march=v32}"
 
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/fr30/fr30.h gcc-mainline/gcc/config/fr30/fr30.h
--- gcc-mainline-6/gcc/config/fr30/fr30.h	2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/fr30/fr30.h	2010-12-01 17:40:45.000000000 -0800
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  
 /*{{{  Run-time target specifications.  */ 
 
 #undef  ASM_SPEC
-#define ASM_SPEC "%{v}"
+#define ASM_SPEC ""
 
 /* Define this to be a string constant containing `-D' options to define the
    predefined macros that identify this machine and system.  These macros will
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/frv/frv.h gcc-mainline/gcc/config/frv/frv.h
--- gcc-mainline-6/gcc/config/frv/frv.h	2010-12-01 16:52:36.000000000 -0800
+++ gcc-mainline/gcc/config/frv/frv.h	2010-12-01 17:40:54.000000000 -0800
@@ -71,7 +71,7 @@
    Defined in svr4.h.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "\
-%{G*} %{v} %{Ym,*} %{Yd,*} \
+%{G*} %{Ym,*} %{Yd,*} \
 %{mtomcat-stats} \
 %{!mno-eflags: \
     %{mcpu=*} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h
--- gcc-mainline-6/gcc/config/i386/linux.h	2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux.h	2010-12-01 17:41:29.000000000 -0800
@@ -104,7 +104,7 @@ along with GCC; see the file COPYING3.  
 
 #undef  ASM_SPEC
 #define ASM_SPEC \
-  "%{v} --32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+  "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
 
 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/linux64.h gcc-mainline/gcc/config/i386/linux64.h
--- gcc-mainline-6/gcc/config/i386/linux64.h	2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux64.h	2010-12-01 17:41:35.000000000 -0800
@@ -71,7 +71,7 @@ see the files COPYING3 and COPYING.RUNTI
 #endif
 
 #undef ASM_SPEC
-#define ASM_SPEC "%{v} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
+#define ASM_SPEC "%{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
  %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
 
 #undef	LINK_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/mingw-w64.h gcc-mainline/gcc/config/i386/mingw-w64.h
--- gcc-mainline-6/gcc/config/i386/mingw-w64.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/mingw-w64.h	2010-12-01 17:41:51.000000000 -0800
@@ -2,7 +2,7 @@
    hosting on Windows 32/64 via mingw-w64 runtime, using GNU tools and
    the Windows API Library.
    Copyright (C) 2009,
-   2009 Free Software Foundation, Inc.
+   2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  
 /* Enable multilib.  */
 
 #undef ASM_SPEC
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64}"
+#define ASM_SPEC "%{m32:--32} %{m64:--64}"
 
 #undef SPEC_32
 #undef SPEC_64
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/sol2-10.h gcc-mainline/gcc/config/i386/sol2-10.h
--- gcc-mainline-6/gcc/config/i386/sol2-10.h	2010-12-01 16:53:00.000000000 -0800
+++ gcc-mainline/gcc/config/i386/sol2-10.h	2010-12-01 17:42:05.000000000 -0800
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  
    assembler requires -xarch=generic or -xarch=generic64 instead.  */
 #undef ASM_SPEC
 #ifdef USE_GAS
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
+#define ASM_SPEC "%{m32:--32} %{m64:--64} -s %(asm_cpu)"
 #else
 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} " \
 		 "%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/vxworks.h gcc-mainline/gcc/config/i386/vxworks.h
--- gcc-mainline-6/gcc/config/i386/vxworks.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/vxworks.h	2010-12-01 17:42:19.000000000 -0800
@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  
 #define TARGET_VERSION fprintf (stderr, " (80586, VxWorks syntax)");
 
 #undef  ASM_SPEC
-#define ASM_SPEC "%{v}"
+#define ASM_SPEC ""
 
 #define TARGET_OS_CPP_BUILTINS()			\
   do							\
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/x86-64.h gcc-mainline/gcc/config/i386/x86-64.h
--- gcc-mainline-6/gcc/config/i386/x86-64.h	2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/x86-64.h	2010-12-01 17:42:26.000000000 -0800
@@ -52,7 +52,7 @@ see the files COPYING3 and COPYING.RUNTI
 #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
 
 #undef ASM_SPEC
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64}"
+#define ASM_SPEC "%{m32:--32} %{m64:--64}"
 
 #undef ASM_OUTPUT_ALIGNED_BSS
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/lm32/lm32.h gcc-mainline/gcc/config/lm32/lm32.h
--- gcc-mainline-6/gcc/config/lm32/lm32.h	2010-11-09 18:02:41.000000000 -0800
+++ gcc-mainline/gcc/config/lm32/lm32.h	2010-12-01 17:42:39.000000000 -0800
@@ -55,7 +55,6 @@
 %{mbarrel-shift-enabled} \
 %{msign-extend-enabled} \
 %{muser-extend-enabled} \
-%{v} \
 "
 
 /* Let link script define all link options. 
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/m32r/m32r.h gcc-mainline/gcc/config/m32r/m32r.h
--- gcc-mainline-6/gcc/config/m32r/m32r.h	2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/m32r/m32r.h	2010-12-01 17:42:57.000000000 -0800
@@ -168,7 +168,7 @@
 
 /* Options to pass on to the assembler.  */
 #undef  ASM_SPEC
-#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
+#define ASM_SPEC "%(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
 
 #define LINK_SPEC "%{v} %(link_cpu) %(relax)"
 
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-6/gcc/config/m68k/linux.h	2010-12-01 17:10:16.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h	2010-12-01 17:43:16.000000000 -0800
@@ -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} %{Ym,*} %{Yd,*}"
+  %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
 
 #undef PREFERRED_STACK_BOUNDARY
 #define PREFERRED_STACK_BOUNDARY 32
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/microblaze/microblaze.h gcc-mainline/gcc/config/microblaze/microblaze.h
--- gcc-mainline-6/gcc/config/microblaze/microblaze.h	2010-12-01 16:24:53.000000000 -0800
+++ gcc-mainline/gcc/config/microblaze/microblaze.h	2010-12-01 17:43:27.000000000 -0800
@@ -74,7 +74,7 @@ extern enum pipeline_type microblaze_pip
 
 /* Assembler specs.  */
 
-#define TARGET_ASM_SPEC "%{v}"
+#define TARGET_ASM_SPEC ""
 
 #define ASM_SPEC "\
 %{microblaze1} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/mips/mips.h gcc-mainline/gcc/config/mips/mips.h
--- gcc-mainline-6/gcc/config/mips/mips.h	2010-11-22 05:28:25.000000000 -0800
+++ gcc-mainline/gcc/config/mips/mips.h	2010-12-01 17:43:41.000000000 -0800
@@ -1141,7 +1141,7 @@ enum mips_code_readable_setting {
 %{mfp32} %{mfp64} \
 %{mshared} %{mno-shared} \
 %{msym32} %{mno-sym32} \
-%{mtune=*} %{v} \
+%{mtune=*} \
 %(subtarget_asm_spec)"
 
 /* Extra switches sometimes passed to the linker.  */
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/mips/vxworks.h gcc-mainline/gcc/config/mips/vxworks.h
--- gcc-mainline-6/gcc/config/mips/vxworks.h	2010-10-24 09:35:46.000000000 -0700
+++ gcc-mainline/gcc/config/mips/vxworks.h	2010-12-01 17:43:48.000000000 -0800
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  
 %(subtarget_asm_debugging_spec) \
 %{mabi=*} %{!mabi*: %(asm_abi_default_spec)} \
 %{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
-%{mtune=*} %{v} \
+%{mtune=*} \
 %(subtarget_asm_spec)"
 
 #undef LINK_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/pa/pa-linux.h gcc-mainline/gcc/config/pa/pa-linux.h
--- gcc-mainline-6/gcc/config/pa/pa-linux.h	2010-12-01 17:09:16.000000000 -0800
+++ gcc-mainline/gcc/config/pa/pa-linux.h	2010-12-01 17:43:58.000000000 -0800
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC \
-  "%{v:-V} %{Ym,*} %{Yd,*}"
+  "%{Ym,*} %{Yd,*}"
 
 /* Define this for shared library support because it isn't in the main
    linux.h file.  */
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/freebsd.h gcc-mainline/gcc/config/rs6000/freebsd.h
--- gcc-mainline-6/gcc/config/rs6000/freebsd.h	2010-12-01 16:26:32.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/freebsd.h	2010-12-01 17:44:10.000000000 -0800
@@ -71,4 +71,4 @@
 #define ASM_APP_OFF "#NO_APP\n"
 /* Define SVR4_ASM_SPEC, we use GAS by default. See svr4.h for details.  */
 #define SVR4_ASM_SPEC \
-  "%{v:-V}"
+  ""
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/linux64.h gcc-mainline/gcc/config/rs6000/linux64.h
--- gcc-mainline-6/gcc/config/rs6000/linux64.h	2010-12-01 17:09:16.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/linux64.h	2010-12-01 17:44:23.000000000 -0800
@@ -207,7 +207,7 @@ extern int dot_symbols;
 
 #define ASM_SPEC_COMMON "%(asm_cpu) \
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
-%{v:-V} %{Qy:} %{!Qn:-Qy} \
+%{Qy:} %{!Qn:-Qy} \
 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
 
 #undef	SUBSUBTARGET_EXTRA_SPECS
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/vxworks.h gcc-mainline/gcc/config/rs6000/vxworks.h
--- gcc-mainline-6/gcc/config/rs6000/vxworks.h	2010-12-01 16:54:09.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/vxworks.h	2010-12-01 17:44:47.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} %{Ym,*} %{Yd,*} \
+ %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} \
  %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
 
 #undef  LIB_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/sparc/openbsd64.h gcc-mainline/gcc/config/sparc/openbsd64.h
--- gcc-mainline-6/gcc/config/sparc/openbsd64.h	2010-12-01 17:29:28.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/openbsd64.h	2010-12-01 17:48:09.000000000 -0800
@@ -55,7 +55,7 @@ along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC "\
-%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
+-s %{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{mlittle-endian:-EL} \
 %(asm_cpu) %(asm_arch) \
 "
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
--- gcc-mainline-6/gcc/config/svr4.h	2010-12-01 16:52:13.000000000 -0800
+++ gcc-mainline/gcc/config/svr4.h	2010-12-01 17:38:50.000000000 -0800
@@ -63,7 +63,7 @@ see the files COPYING3 and COPYING.RUNTI
 
 #ifdef USE_GAS
 #define SVR4_ASM_SPEC \
-  "%{v:-V}"
+  ""
 #else
 #define SVR4_ASM_SPEC \
   "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/xtensa/elf.h gcc-mainline/gcc/config/xtensa/elf.h
--- gcc-mainline-6/gcc/config/xtensa/elf.h	2010-11-19 13:28:10.000000000 -0800
+++ gcc-mainline/gcc/config/xtensa/elf.h	2010-12-01 17:48:43.000000000 -0800
@@ -43,8 +43,7 @@ along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC \
- "%{v} \
-  %{mtext-section-literals:--text-section-literals} \
+ "%{mtext-section-literals:--text-section-literals} \
   %{mno-text-section-literals:--no-text-section-literals} \
   %{mtarget-align:--target-align} \
   %{mno-target-align:--no-target-align} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/xtensa/linux.h gcc-mainline/gcc/config/xtensa/linux.h
--- gcc-mainline-6/gcc/config/xtensa/linux.h	2010-12-01 17:18:28.000000000 -0800
+++ gcc-mainline/gcc/config/xtensa/linux.h	2010-12-01 17:48:53.000000000 -0800
@@ -35,8 +35,7 @@ along with GCC; see the file COPYING3.  
 
 #undef ASM_SPEC
 #define ASM_SPEC \
- "%{v} \
-  %{mtext-section-literals:--text-section-literals} \
+ "%{mtext-section-literals:--text-section-literals} \
   %{mno-text-section-literals:--no-text-section-literals} \
   %{mtarget-align:--target-align} \
   %{mno-target-align:--no-target-align} \

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [8/9] Specs cleanup: -V
  2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
                   ` (6 preceding siblings ...)
  2010-12-02 16:37 ` [9/9] Specs cleanup: -b Joseph S. Myers
@ 2010-12-02 16:37 ` Joseph S. Myers
  2010-12-02 16:47   ` Richard Guenther
  2010-12-02 16:37 ` [7/9] Specs cleanup: -v for assembler Joseph S. Myers
  8 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-02 16:37 UTC (permalink / raw)
  To: gcc-patches

Until it was removed, -V was a GCC option to cause the driver to run a
different GCC version.  It was never handled by specs and since it was
removed it's best that it gives an error as an unknown option.

In particular, it was never an option to be verbose or print version
numbers, although some specs treated it as such.  This patch fixes
those specs - including removing chunks of a comment cut-and-pasted
into many files that doesn't seem to serve any useful purpose (and is
often inaccurate regarding the actual spec contents), and removing
%{v:%{!V:-V}} where it appears in ASM_SPEC for the GNU assembler (see
patch 7).

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

	* config/i386/freebsd.h (LINK_SPEC): Cut long comment.
	* config/i386/linux.h (LINK_SPEC): Cut long comment.
	* config/i386/netware.h (LINK_SPEC): Remove %{V}.
	* config/m32r/linux.h (LINK_SPEC): Cut long comment.
	* config/m68k/linux.h (LINK_SPEC): Cut long comment.
	* config/sparc/linux.h (LINK_SPEC): Cut long comment.
	(ASM_SPEC): Remove %{V} and %{v:%{!V:-V}}.
	* config/sparc/linux64.h (LINK_SPEC): Cut long comment.
	(ASM_SPEC): Remove %{V} and %{v:%{!V:-V}}.
	* config/sparc/netbsd-elf.h (ASM_SPEC): Remove %{V} and
	%{v:%{!V:-V}}.

diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/freebsd.h gcc-mainline/gcc/config/i386/freebsd.h
--- gcc-mainline-7/gcc/config/i386/freebsd.h	2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/freebsd.h	2010-12-01 18:00:05.000000000 -0800
@@ -88,13 +88,7 @@ along with GCC; see the file COPYING3.  
 /* Provide a LINK_SPEC appropriate for FreeBSD.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time. We like to support here for
-   as many of the other GNU linker options as possible. But I don't
-   have the time to search for those flags. I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h
--- gcc-mainline-7/gcc/config/i386/linux.h	2010-12-01 17:41:29.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux.h	2010-12-01 18:00:20.000000000 -0800
@@ -85,13 +85,7 @@ along with GCC; see the file COPYING3.  
 /* Provide a LINK_SPEC appropriate for Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time. We like to support here for
-   as many of the other GNU linker options as possible. But I don't
-   have the time to search for those flags. I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/netware.h gcc-mainline/gcc/config/i386/netware.h
--- gcc-mainline-7/gcc/config/i386/netware.h	2010-11-19 13:23:42.000000000 -0800
+++ gcc-mainline/gcc/config/i386/netware.h	2010-12-01 17:58:33.000000000 -0800
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3.  
 
 /* Kinda useless, but what the hell */
 #undef	LINK_SPEC
-#define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \
+#define LINK_SPEC "%{h*} %{v:-V} \
 		   %{b} \
 		   %{Qy:} %{!Qn:-Qy}"
 
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/m32r/linux.h gcc-mainline/gcc/config/m32r/linux.h
--- gcc-mainline-7/gcc/config/m32r/linux.h	2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/m32r/linux.h	2010-12-01 18:00:43.000000000 -0800
@@ -41,13 +41,7 @@
 /* Provide a LINK_SPEC appropriate for Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time. We like to support here for
-   as many of the other GNU linker options as possible. But I don't
-   have the time to search for those flags. I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-7/gcc/config/m68k/linux.h	2010-12-01 17:43:16.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h	2010-12-01 18:01:07.000000000 -0800
@@ -71,13 +71,7 @@ along with GCC; see the file COPYING3.  
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time.  We like to support here for
-   as many of the other GNU linker options as possible.  But I don't
-   have the time to search for those flags.  I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}.  It is too much :-(.  They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
--- gcc-mainline-7/gcc/config/sparc/linux.h	2010-12-01 17:46:12.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux.h	2010-12-01 18:01:22.000000000 -0800
@@ -70,13 +70,7 @@ along with GCC; see the file COPYING3.  
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time. We like to support here for
-   as many of the other GNU linker options as possible. But I don't
-   have the time to search for those flags. I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
@@ -99,8 +93,6 @@ 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:%{!V:-V}} \
 %{!Qn:-Qy} \
 %{Ym,*} \
 -s \
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
--- gcc-mainline-7/gcc/config/sparc/linux64.h	2010-12-01 17:09:16.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/linux64.h	2010-12-01 18:01:36.000000000 -0800
@@ -96,13 +96,7 @@ along with GCC; see the file COPYING3.  
 /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
    for the special GCC options -static and -shared, which allow us to
    link things in one of these three modes by applying the appropriate
-   combinations of options at link-time. We like to support here for
-   as many of the other GNU linker options as possible. But I don't
-   have the time to search for those flags. I am sure how to add
-   support for -soname shared_object_name. H.J.
-
-   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-   -Wl,-V.
+   combinations of options at link-time.
 
    When the -shared link option is used a final link is not being
    done.  */
@@ -228,8 +222,6 @@ 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:%{!V:-V}} \
 %{!Qn:-Qy} \
 %{Ym,*} \
 -s \
diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/netbsd-elf.h gcc-mainline/gcc/config/sparc/netbsd-elf.h
--- gcc-mainline-7/gcc/config/sparc/netbsd-elf.h	2009-03-28 00:38:07.000000000 -0700
+++ gcc-mainline/gcc/config/sparc/netbsd-elf.h	2010-12-01 17:59:24.000000000 -0800
@@ -1,6 +1,7 @@
 /* Definitions of target machine for GCC, for ELF on NetBSD/sparc
    and NetBSD/sparc64.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2010
+   Free Software Foundation, Inc.
    Contributed by Matthew Green (mrg@eterna.com.au).
 
 This file is part of GCC.
@@ -71,7 +72,7 @@ along with GCC; see the file COPYING3.  
 #define USER_LABEL_PREFIX ""
 
 #undef ASM_SPEC
-#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %{V} %{v:%{!V:-V}} \
+#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} \
 %{mlittle-endian:-EL} \
 %(asm_cpu) %(asm_arch) %(asm_relax)"
 

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl,
  2010-12-02 16:33 ` [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl, Joseph S. Myers
@ 2010-12-02 16:38   ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-02 16:38 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 2, 2010 at 5:33 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Various targets have ASM_SPEC or LINK_SPEC handling -Wa, and -Wl,.
> This serves no purpose; those options are processed by the driver in
> such a way that they are never seen by specs, so (a) there is no need
> for specs to pass them through to the relevant tools and (b) it is not
> possible for specs to test whether a particular option was passed with
> -Wa, or -Wl,.  This patch removes all these useless specs.

I think this qualifies as obvious.

OK nevertheless.
Thanks,
Richard.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/alpha/freebsd.h (LINK_SPEC): Don't handle -Wl,.
>        * config/bfin/bfin.h (ASM_SPEC): Don't handle -Wa,.
>        * config/frv/frv.h (ASM_SPEC): Don't handle -Wa,.
>        * config/lm32/uclinux-elf.h (LINK_SPEC): Don't handle -Wl,.
>        * config/microblaze/microblaze.h (LINK_SPEC): Don't handle -Wl,.
>        * config/mn10300/linux.h (ASM_SPEC): Don't handle -Wa,.
>        * config/pa/pa-linux.h (ASM_SPEC): Don't handle -Wa,.
>        * config/rs6000/freebsd.h (SVR4_ASM_SPEC): Don't handle -Wa,.
>        * config/rs6000/linux64.h (ASM_SPEC_COMMON): Don't handle -Wa,.
>        * config/rs6000/sysv4.h (LINK_SPEC): Don't handle -Wl,.
>        * config/rs6000/vxworks.h (ASM_SPEC): Don't handle -Wa,.
>        * config/sol2.h (ASM_SPEC): Don't handle -Wa,.
>        * config/sparc/linux.h (ASM_SPEC): Don't handle -Wa,.
>        * config/sparc/linux64.h (ASM_SPEC): Don't handle -Wa,.
>        * config/sparc/sp-elf.h (ASM_SPEC): Don't handle -Wa,.
>        * config/sparc/sysv4.h (ASM_SPEC): Don't handle -Wa,.
>        * config/svr4.h (SVR4_ASM_SPEC): Don't handle -Wa,.
>        * config/vxworks.h (VXWORKS_LINK_SPEC): Don't handle -Wl,.
>
> Index: gcc/config/alpha/freebsd.h
> ===================================================================
> --- gcc/config/alpha/freebsd.h  (revision 167352)
> +++ gcc/config/alpha/freebsd.h  (working copy)
> @@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.
>
>  #define LINK_SPEC "%{G*} %{relax:-relax}                               \
>   %{p:%nconsider using '-pg' instead of '-p' with gprof(1)}            \
> -  %{Wl,*:%*}                                                           \
>   %{assert*} %{R*} %{rpath*} %{defsym*}                                        \
>   %{shared:-Bshareable %{h*} %{soname*}}                               \
>   %{!shared:                                                           \
> Index: gcc/config/frv/frv.h
> ===================================================================
> --- gcc/config/frv/frv.h        (revision 167352)
> +++ gcc/config/frv/frv.h        (working copy)
> @@ -71,7 +71,7 @@
>    Defined in svr4.h.  */
>  #undef  ASM_SPEC
>  #define ASM_SPEC "\
> -%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
> +%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} \
>  %{mtomcat-stats} \
>  %{!mno-eflags: \
>     %{mcpu=*} \
> Index: gcc/config/sparc/linux.h
> ===================================================================
> --- gcc/config/sparc/linux.h    (revision 167352)
> +++ gcc/config/sparc/linux.h    (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for SPARC running Linux-based GNU systems with ELF.
>    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
> -   2007, 2008, 2009 Free Software Foundation, Inc.
> +   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Eddie C. Dost (ecd@skynet.be)
>
>  This file is part of GCC.
> @@ -105,7 +105,6 @@ along with GCC; see the file COPYING3.
>  %{n} \
>  %{T} \
>  %{Ym,*} \
> -%{Wa,*:%*} \
>  -s \
>  %{fpic|fPIC|fpie|fPIE:-K PIC} \
>  %{!.c:%{findirect-dispatch:-K PIC}} \
> Index: gcc/config/sparc/sp-elf.h
> ===================================================================
> --- gcc/config/sparc/sp-elf.h   (revision 167352)
> +++ gcc/config/sparc/sp-elf.h   (working copy)
> @@ -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,*} %{Wa,*:%*} -s \
> +  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
>    %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu)"
>
>  /* Use the default.  */
> Index: gcc/config/sparc/linux64.h
> ===================================================================
> --- gcc/config/sparc/linux64.h  (revision 167352)
> +++ gcc/config/sparc/linux64.h  (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
>    Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
> -   2009 Free Software Foundation, Inc.
> +   2009, 2010 Free Software Foundation, Inc.
>    Contributed by David S. Miller (davem@caip.rutgers.edu)
>
>  This file is part of GCC.
> @@ -234,7 +234,6 @@ along with GCC; see the file COPYING3.
>  %{n} \
>  %{T} \
>  %{Ym,*} \
> -%{Wa,*:%*} \
>  -s \
>  %{fpic|fPIC|fpie|fPIE:-K PIC} \
>  %{!.c:%{findirect-dispatch:-K PIC}} \
> Index: gcc/config/sparc/sysv4.h
> ===================================================================
> --- gcc/config/sparc/sysv4.h    (revision 167352)
> +++ gcc/config/sparc/sysv4.h    (working copy)
> @@ -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,*} %{Wa,*:%*} \
> +  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
>    %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
>
>  /* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
> Index: gcc/config/sol2.h
> ===================================================================
> --- gcc/config/sol2.h   (revision 167352)
> +++ gcc/config/sol2.h   (working copy)
> @@ -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,*} %{Wa,*:%*} -s \
> +%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} -s \
>  %{fpic|fpie|fPIC|fPIE:-K PIC} \
>  %(asm_cpu) \
>  "
> Index: gcc/config/microblaze/microblaze.h
> ===================================================================
> --- gcc/config/microblaze/microblaze.h  (revision 167352)
> +++ gcc/config/microblaze/microblaze.h  (working copy)
> @@ -87,7 +87,7 @@ extern enum pipeline_type microblaze_pip
>   %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
>   %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
>   %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
> -  %{!Wl,-T*: %{!T*: -dT xilinx.ld%s}}"
> +  %{!T*: -dT xilinx.ld%s}"
>
>  /* Specs for the compiler proper  */
>
> Index: gcc/config/lm32/uclinux-elf.h
> ===================================================================
> --- gcc/config/lm32/uclinux-elf.h       (revision 167352)
> +++ gcc/config/lm32/uclinux-elf.h       (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for LM32 running Linux-based GNU systems using ELF
>    Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
> -   2009 Free Software Foundation, Inc.
> +   2009, 2010 Free Software Foundation, Inc.
>    Contributed by Philip Blundell <philb@gnu.org>
>
>    This file is part of GCC.
> @@ -68,7 +68,7 @@
>
>  #undef  LINK_SPEC
>  #define LINK_SPEC "%{h*} %{version:-v} \
> -   %{b} %{Wl,*:%*} \
> +   %{b} \
>    %{static:-Bstatic} \
>    %{shared:-shared} \
>    %{symbolic:-Bsymbolic} \
> Index: gcc/config/svr4.h
> ===================================================================
> --- gcc/config/svr4.h   (revision 167352)
> +++ gcc/config/svr4.h   (working copy)
> @@ -63,10 +63,10 @@ see the files COPYING3 and COPYING.RUNTI
>
>  #ifdef USE_GAS
>  #define SVR4_ASM_SPEC \
> -  "%{v:-V} %{Wa,*:%*}"
> +  "%{v:-V}"
>  #else
>  #define SVR4_ASM_SPEC \
> -  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
> +  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
>  #endif
>
>  #undef  ASM_SPEC
> Index: gcc/config/mn10300/linux.h
> ===================================================================
> --- gcc/config/mn10300/linux.h  (revision 167352)
> +++ gcc/config/mn10300/linux.h  (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of taret machine for GNU compiler.
>    Matsushita AM33/2.0
> -   Copyright 2001, 2002, 2005, 2006, 2007 Free Software Foundation, Inc.
> +   Copyright 2001, 2002, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
>    Contributed by Alexandre Oliva <aoliva@redhat.com>
>
>    This file is part of GCC.
> @@ -30,7 +30,7 @@
>   %{pthread:-D_REENTRANT -D_PTHREADS}"
>
>  #undef  ASM_SPEC
> -#define ASM_SPEC "%{Wa,*:%*}"
> +#define ASM_SPEC ""
>
>  #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
>
> Index: gcc/config/rs6000/linux64.h
> ===================================================================
> --- gcc/config/rs6000/linux64.h (revision 167352)
> +++ gcc/config/rs6000/linux64.h (working copy)
> @@ -207,7 +207,7 @@ extern int dot_symbols;
>
>  #define ASM_SPEC_COMMON "%(asm_cpu) \
>  %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
> -%{v:-V} %{Qy:} %{!Qn:-Qy} %{Wa,*:%*} \
> +%{v:-V} %{Qy:} %{!Qn:-Qy} \
>  %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
>
>  #undef SUBSUBTARGET_EXTRA_SPECS
> Index: gcc/config/rs6000/freebsd.h
> ===================================================================
> --- gcc/config/rs6000/freebsd.h (revision 167352)
> +++ gcc/config/rs6000/freebsd.h (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions for PowerPC running FreeBSD using the ELF format
> -   Copyright (C) 2001, 2003, 2007, 2009 Free Software Foundation, Inc.
> +   Copyright (C) 2001, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
>
>    This file is part of GCC.
> @@ -71,4 +71,4 @@
>  #define ASM_APP_OFF "#NO_APP\n"
>  /* Define SVR4_ASM_SPEC, we use GAS by default. See svr4.h for details.  */
>  #define SVR4_ASM_SPEC \
> -  "%{v:-V} %{Wa,*:%*}"
> +  "%{v:-V}"
> Index: gcc/config/rs6000/vxworks.h
> ===================================================================
> --- gcc/config/rs6000/vxworks.h (revision 167352)
> +++ gcc/config/rs6000/vxworks.h (working copy)
> @@ -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,*} %{Wa,*:%*} \
> + %{v:-v} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
>  %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
>
>  #undef  LIB_SPEC
> Index: gcc/config/rs6000/sysv4.h
> ===================================================================
> --- gcc/config/rs6000/sysv4.h   (revision 167352)
> +++ gcc/config/rs6000/sysv4.h   (working copy)
> @@ -644,7 +644,7 @@ SVR4_ASM_SPEC \
>  %{YP,*} %{R*} \
>  %{Qy:} %{!Qn:-Qy} \
>  %(link_shlib) \
> -%{!Wl,-T*: %{!T*: %(link_start) }} \
> +%{!T*: %(link_start) } \
>  %(link_target) \
>  %(link_os)"
>
> Index: gcc/config/pa/pa-linux.h
> ===================================================================
> --- gcc/config/pa/pa-linux.h    (revision 167352)
> +++ gcc/config/pa/pa-linux.h    (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions for PA_RISC with ELF format
> -   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
> +   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.
>
>  #undef ASM_SPEC
>  #define ASM_SPEC \
> -  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
> +  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*}"
>
>  /* Define this for shared library support because it isn't in the main
>    linux.h file.  */
> Index: gcc/config/vxworks.h
> ===================================================================
> --- gcc/config/vxworks.h        (revision 167352)
> +++ gcc/config/vxworks.h        (working copy)
> @@ -60,7 +60,7 @@ along with GCC; see the file COPYING3.
>  "%{!mrtp:-r}                                           \
>  %{!shared:                                            \
>    %{mrtp:-q %{h*}                                     \
> -          %{R*} %{!Wl,-T*: %{!T*: %(link_start) }}     \
> +          %{R*} %{!T*: %(link_start) }                 \
>           %(link_target) %(link_os)}}                  \
>  %{v:-v}                                               \
>  %{shared:-shared}                                     \
> Index: gcc/config/bfin/bfin.h
> ===================================================================
> --- gcc/config/bfin/bfin.h      (revision 167352)
> +++ gcc/config/bfin/bfin.h      (working copy)
> @@ -248,7 +248,7 @@ extern unsigned int bfin_workarounds;
>    Defined in svr4.h.  */
>  #undef  ASM_SPEC
>  #define ASM_SPEC "\
> -%{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
> +%{v} %{n} %{T} %{Ym,*} %{Yd,*} \
>     %{mno-fdpic:-mnopic} %{mfdpic}"
>
>  #define LINK_SPEC "\
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [4/9] Specs cleanup: -ftraditional
  2010-12-02 16:36 ` [4/9] Specs cleanup: -ftraditional Joseph S. Myers
@ 2010-12-02 16:40   ` Richard Guenther
  2010-12-02 21:09     ` Mike Stump
  0 siblings, 1 reply; 26+ messages in thread
From: Richard Guenther @ 2010-12-02 16:40 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 2, 2010 at 5:35 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> There are some specs that treat -ftraditional like -traditional and
> -traditional-cpp.  But the option will be passed to cc1, which rejects
> it even when preprocessing, so these specs are useless.  It appears
> that actual support for -ftraditional as an alias of -traditional was
> removed in 3.3 along with the support for -traditional compilation (as
> opposed to preprocessing).  I don't think it's now useful to restore
> the alias; instead, this patch removes the useless specs.

Reviewed.  The gcc.c changes are ok, the objc changes I consider
obvious.

Thanks,
Richard.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * gcc.c (trad_capable_cpp, default_compilers): Don't handle
>        -ftraditional.
>
> objc:
> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * lang-specs.h: Don't handle -ftraditional.
>
> diff -rupN --exclude=.svn gcc-mainline-3/gcc/gcc.c gcc-mainline/gcc/gcc.c
> --- gcc-mainline-3/gcc/gcc.c    2010-12-01 16:45:23.000000000 -0800
> +++ gcc-mainline/gcc/gcc.c      2010-12-01 17:01:57.000000000 -0800
> @@ -709,7 +709,7 @@ static const char *sysroot_hdrs_suffix_s
>    call cc1 (or cc1obj in objc/lang-specs.h) from the main specs so
>    that we default the front end language better.  */
>  static const char *trad_capable_cpp =
> -"cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}";
> +"cc1 -E %{traditional|traditional-cpp:-traditional-cpp}";
>
>  /* We don't wrap .d files in %W{} since a missing .d file, and
>    therefore no dependency entry, confuses make into thinking a .o
> @@ -903,7 +903,7 @@ static const struct compiler default_com
>       external preprocessor if -save-temps is given.  */
>      "%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\
>       %{!E:%{!M:%{!MM:\
> -          %{traditional|ftraditional:\
> +          %{traditional:\
>  %eGNU C no longer supports -traditional without -E}\
>       %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
>          %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
> diff -rupN --exclude=.svn gcc-mainline-3/gcc/objc/lang-specs.h gcc-mainline/gcc/objc/lang-specs.h
> --- gcc-mainline-3/gcc/objc/lang-specs.h        2010-11-23 04:47:58.000000000 -0800
> +++ gcc-mainline/gcc/objc/lang-specs.h  2010-12-01 17:02:18.000000000 -0800
> @@ -1,5 +1,5 @@
>  /* Definitions for specs for Objective-C.
> -   Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007
> +   Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -24,10 +24,10 @@ along with GCC; see the file COPYING3.
>
>   {".m", "@objective-c", 0, 0, 0},
>   {"@objective-c",
> -     "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
> +     "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
>           %(cpp_options) %(cpp_debug_options)}\
>       %{!E:%{!M:%{!MM:\
> -       %{traditional|ftraditional|traditional-cpp:\
> +       %{traditional|traditional-cpp:\
>  %eGNU Objective C no longer supports traditional compilation}\
>        %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
>            cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
> @@ -35,10 +35,10 @@ along with GCC; see the file COPYING3.
>            cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
>         %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
>   {"@objective-c-header",
> -     "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
> +     "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
>           %(cpp_options) %(cpp_debug_options)}\
>       %{!E:%{!M:%{!MM:\
> -       %{traditional|ftraditional|traditional-cpp:\
> +       %{traditional|traditional-cpp:\
>  %eGNU Objective C no longer supports traditional compilation}\
>        %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
>            cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [8/9] Specs cleanup: -V
  2010-12-02 16:37 ` [8/9] Specs cleanup: -V Joseph S. Myers
@ 2010-12-02 16:47   ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-02 16:47 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 2, 2010 at 5:37 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Until it was removed, -V was a GCC option to cause the driver to run a
> different GCC version.  It was never handled by specs and since it was
> removed it's best that it gives an error as an unknown option.
>
> In particular, it was never an option to be verbose or print version
> numbers, although some specs treated it as such.  This patch fixes
> those specs - including removing chunks of a comment cut-and-pasted
> into many files that doesn't seem to serve any useful purpose (and is
> often inaccurate regarding the actual spec contents), and removing
> %{v:%{!V:-V}} where it appears in ASM_SPEC for the GNU assembler (see
> patch 7).

Ok.

Thanks,
Richard.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/i386/freebsd.h (LINK_SPEC): Cut long comment.
>        * config/i386/linux.h (LINK_SPEC): Cut long comment.
>        * config/i386/netware.h (LINK_SPEC): Remove %{V}.
>        * config/m32r/linux.h (LINK_SPEC): Cut long comment.
>        * config/m68k/linux.h (LINK_SPEC): Cut long comment.
>        * config/sparc/linux.h (LINK_SPEC): Cut long comment.
>        (ASM_SPEC): Remove %{V} and %{v:%{!V:-V}}.
>        * config/sparc/linux64.h (LINK_SPEC): Cut long comment.
>        (ASM_SPEC): Remove %{V} and %{v:%{!V:-V}}.
>        * config/sparc/netbsd-elf.h (ASM_SPEC): Remove %{V} and
>        %{v:%{!V:-V}}.
>
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/freebsd.h gcc-mainline/gcc/config/i386/freebsd.h
> --- gcc-mainline-7/gcc/config/i386/freebsd.h    2010-12-01 17:09:15.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/freebsd.h      2010-12-01 18:00:05.000000000 -0800
> @@ -88,13 +88,7 @@ along with GCC; see the file COPYING3.
>  /* Provide a LINK_SPEC appropriate for FreeBSD.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time. We like to support here for
> -   as many of the other GNU linker options as possible. But I don't
> -   have the time to search for those flags. I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h
> --- gcc-mainline-7/gcc/config/i386/linux.h      2010-12-01 17:41:29.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/linux.h        2010-12-01 18:00:20.000000000 -0800
> @@ -85,13 +85,7 @@ along with GCC; see the file COPYING3.
>  /* Provide a LINK_SPEC appropriate for Linux.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time. We like to support here for
> -   as many of the other GNU linker options as possible. But I don't
> -   have the time to search for those flags. I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/i386/netware.h gcc-mainline/gcc/config/i386/netware.h
> --- gcc-mainline-7/gcc/config/i386/netware.h    2010-11-19 13:23:42.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/netware.h      2010-12-01 17:58:33.000000000 -0800
> @@ -31,7 +31,7 @@ along with GCC; see the file COPYING3.
>
>  /* Kinda useless, but what the hell */
>  #undef LINK_SPEC
> -#define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \
> +#define LINK_SPEC "%{h*} %{v:-V} \
>                   %{b} \
>                   %{Qy:} %{!Qn:-Qy}"
>
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/m32r/linux.h gcc-mainline/gcc/config/m32r/linux.h
> --- gcc-mainline-7/gcc/config/m32r/linux.h      2010-12-01 17:09:15.000000000 -0800
> +++ gcc-mainline/gcc/config/m32r/linux.h        2010-12-01 18:00:43.000000000 -0800
> @@ -41,13 +41,7 @@
>  /* Provide a LINK_SPEC appropriate for Linux.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time. We like to support here for
> -   as many of the other GNU linker options as possible. But I don't
> -   have the time to search for those flags. I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
> --- gcc-mainline-7/gcc/config/m68k/linux.h      2010-12-01 17:43:16.000000000 -0800
> +++ gcc-mainline/gcc/config/m68k/linux.h        2010-12-01 18:01:07.000000000 -0800
> @@ -71,13 +71,7 @@ along with GCC; see the file COPYING3.
>  /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time.  We like to support here for
> -   as many of the other GNU linker options as possible.  But I don't
> -   have the time to search for those flags.  I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}.  It is too much :-(.  They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h
> --- gcc-mainline-7/gcc/config/sparc/linux.h     2010-12-01 17:46:12.000000000 -0800
> +++ gcc-mainline/gcc/config/sparc/linux.h       2010-12-01 18:01:22.000000000 -0800
> @@ -70,13 +70,7 @@ along with GCC; see the file COPYING3.
>  /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time. We like to support here for
> -   as many of the other GNU linker options as possible. But I don't
> -   have the time to search for those flags. I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> @@ -99,8 +93,6 @@ 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:%{!V:-V}} \
>  %{!Qn:-Qy} \
>  %{Ym,*} \
>  -s \
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h
> --- gcc-mainline-7/gcc/config/sparc/linux64.h   2010-12-01 17:09:16.000000000 -0800
> +++ gcc-mainline/gcc/config/sparc/linux64.h     2010-12-01 18:01:36.000000000 -0800
> @@ -96,13 +96,7 @@ along with GCC; see the file COPYING3.
>  /* Provide a LINK_SPEC appropriate for GNU/Linux.  Here we provide support
>    for the special GCC options -static and -shared, which allow us to
>    link things in one of these three modes by applying the appropriate
> -   combinations of options at link-time. We like to support here for
> -   as many of the other GNU linker options as possible. But I don't
> -   have the time to search for those flags. I am sure how to add
> -   support for -soname shared_object_name. H.J.
> -
> -   I took out %{v:%{!V:-V}}. It is too much :-(. They can use
> -   -Wl,-V.
> +   combinations of options at link-time.
>
>    When the -shared link option is used a final link is not being
>    done.  */
> @@ -228,8 +222,6 @@ 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:%{!V:-V}} \
>  %{!Qn:-Qy} \
>  %{Ym,*} \
>  -s \
> diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/sparc/netbsd-elf.h gcc-mainline/gcc/config/sparc/netbsd-elf.h
> --- gcc-mainline-7/gcc/config/sparc/netbsd-elf.h        2009-03-28 00:38:07.000000000 -0700
> +++ gcc-mainline/gcc/config/sparc/netbsd-elf.h  2010-12-01 17:59:24.000000000 -0800
> @@ -1,6 +1,7 @@
>  /* Definitions of target machine for GCC, for ELF on NetBSD/sparc
>    and NetBSD/sparc64.
> -   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2010
> +   Free Software Foundation, Inc.
>    Contributed by Matthew Green (mrg@eterna.com.au).
>
>  This file is part of GCC.
> @@ -71,7 +72,7 @@ along with GCC; see the file COPYING3.
>  #define USER_LABEL_PREFIX ""
>
>  #undef ASM_SPEC
> -#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %{V} %{v:%{!V:-V}} \
> +#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} \
>  %{mlittle-endian:-EL} \
>  %(asm_cpu) %(asm_arch) %(asm_relax)"
>
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [9/9] Specs cleanup: -b
  2010-12-02 16:37 ` [9/9] Specs cleanup: -b Joseph S. Myers
@ 2010-12-02 16:48   ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-02 16:48 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 2, 2010 at 5:37 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Until it was removed, -b was a GCC option to cause the driver to run
> GCC for a different target.  It was never handled by specs and since it
> was removed it's best that it gives an error as an unknown option.
> This patch removes it from various specs that would have passed it to
> the linker.

Ok.

Thanks,
Richard.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/bfin/bfin.h (LINK_SPEC): Remove %{b}.
>        * config/frv/frv.h (LINK_SPEC): Remove %{b}.
>        * config/i386/netware.h (LINK_SPEC): Remove %{b}.
>        * config/i386/nto.h (LINK_SPEC): Remove %{b}.
>        * config/lm32/uclinux-elf.h (LINK_SPEC): Remove %{b}.
>        * config/sol2.h (LINK_SPEC): Remove %{b}.
>        * config/svr4.h (LINK_SPEC): Remove %{b}.
>
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/bfin/bfin.h gcc-mainline/gcc/config/bfin/bfin.h
> --- gcc-mainline-8/gcc/config/bfin/bfin.h       2010-12-01 17:40:18.000000000 -0800
> +++ gcc-mainline/gcc/config/bfin/bfin.h 2010-12-01 18:08:02.000000000 -0800
> @@ -253,7 +253,6 @@ extern unsigned int bfin_workarounds;
>
>  #define LINK_SPEC "\
>  %{h*} %{v:-V} \
> -%{b} \
>  %{mfdpic:-melf32bfinfd -z text} \
>  %{static:-dn -Bstatic} \
>  %{shared:-G -Bdynamic} \
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/frv/frv.h gcc-mainline/gcc/config/frv/frv.h
> --- gcc-mainline-8/gcc/config/frv/frv.h 2010-12-01 17:40:54.000000000 -0800
> +++ gcc-mainline/gcc/config/frv/frv.h   2010-12-01 18:08:13.000000000 -0800
> @@ -160,7 +160,6 @@
>  #undef LINK_SPEC
>  #define LINK_SPEC "\
>  %{h*} %{v:-V} \
> -%{b} \
>  %{mfdpic:-melf32frvfd -z text} \
>  %{static:-dn -Bstatic} \
>  %{shared:-Bdynamic} \
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/i386/netware.h gcc-mainline/gcc/config/i386/netware.h
> --- gcc-mainline-8/gcc/config/i386/netware.h    2010-12-01 17:58:33.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/netware.h      2010-12-01 18:08:24.000000000 -0800
> @@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.
>  /* Kinda useless, but what the hell */
>  #undef LINK_SPEC
>  #define LINK_SPEC "%{h*} %{v:-V} \
> -                  %{b} \
>                   %{Qy:} %{!Qn:-Qy}"
>
>  #undef STARTFILE_SPEC
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/i386/nto.h gcc-mainline/gcc/config/i386/nto.h
> --- gcc-mainline-8/gcc/config/i386/nto.h        2010-10-08 08:19:51.000000000 -0700
> +++ gcc-mainline/gcc/config/i386/nto.h  2010-12-01 18:08:58.000000000 -0800
> @@ -1,5 +1,5 @@
>  /* Definitions for Intel 386 running QNX/Neutrino.
> -   Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -64,7 +64,6 @@ crti.o%s \
>  #undef LINK_SPEC
>  #define LINK_SPEC \
>   "%{h*} %{v:-V} \
> -   %{b} \
>    %{static:-dn -Bstatic} \
>    %{shared:-G -dy -z text} \
>    %{symbolic:-Bsymbolic -G -dy -z text} \
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/lm32/uclinux-elf.h gcc-mainline/gcc/config/lm32/uclinux-elf.h
> --- gcc-mainline-8/gcc/config/lm32/uclinux-elf.h        2010-12-01 17:09:15.000000000 -0800
> +++ gcc-mainline/gcc/config/lm32/uclinux-elf.h  2010-12-01 18:09:19.000000000 -0800
> @@ -68,7 +68,6 @@
>
>  #undef  LINK_SPEC
>  #define LINK_SPEC "%{h*} %{version:-v} \
> -   %{b} \
>    %{static:-Bstatic} \
>    %{shared:-shared} \
>    %{symbolic:-Bsymbolic} \
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/sol2.h gcc-mainline/gcc/config/sol2.h
> --- gcc-mainline-8/gcc/config/sol2.h    2010-12-01 16:52:05.000000000 -0800
> +++ gcc-mainline/gcc/config/sol2.h      2010-12-01 18:07:45.000000000 -0800
> @@ -175,7 +175,6 @@ along with GCC; see the file COPYING3.
>  #undef  LINK_SPEC
>  #define LINK_SPEC \
>   "%{h*} %{v:-V} \
> -   %{b} \
>    %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
>    %{static:-dn -Bstatic} \
>    %{shared:-G -dy %{!mimpure-text:-z text}} \
> diff -rupN --exclude=.svn gcc-mainline-8/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
> --- gcc-mainline-8/gcc/config/svr4.h    2010-12-01 17:38:50.000000000 -0800
> +++ gcc-mainline/gcc/config/svr4.h      2010-12-01 18:10:46.000000000 -0800
> @@ -112,7 +112,7 @@ see the files COPYING3 and COPYING.RUNTI
>    support here for as many of the other svr4 linker options as seems
>    reasonable, given that some of them conflict with options for other
>    svr4 tools (e.g. the assembler).  In particular, we do support the
> -   -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
> +   -z*, -V, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
>    -o*, -r, -s, -u*, and -L* options are directly supported by gcc.c
>    itself.  We don't directly support the -m (generate load map)
>    option because that conflicts with the -m (run m4) option of the
> @@ -131,7 +131,6 @@ see the files COPYING3 and COPYING.RUNTI
>  #undef LINK_SPEC
>  #ifdef CROSS_DIRECTORY_STRUCTURE
>  #define LINK_SPEC "%{h*} %{v:-V} \
> -                  %{b} \
>                   %{static:-dn -Bstatic} \
>                   %{shared:-G -dy -z text} \
>                   %{symbolic:-Bsymbolic -G -dy -z text} \
> @@ -140,7 +139,6 @@ see the files COPYING3 and COPYING.RUNTI
>                   %{Qy:} %{!Qn:-Qy}"
>  #else
>  #define LINK_SPEC "%{h*} %{v:-V} \
> -                  %{b} \
>                   %{static:-dn -Bstatic} \
>                   %{shared:-G -dy -z text} \
>                   %{symbolic:-Bsymbolic -G -dy -z text} \
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [4/9] Specs cleanup: -ftraditional
  2010-12-02 16:40   ` Richard Guenther
@ 2010-12-02 21:09     ` Mike Stump
  0 siblings, 0 replies; 26+ messages in thread
From: Mike Stump @ 2010-12-02 21:09 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Joseph S. Myers, gcc-patches

On Dec 2, 2010, at 8:40 AM, Richard Guenther wrote:
> Reviewed.  The gcc.c changes are ok, the objc changes I consider
> obvious.

Thanks for the review, I concur.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [2/9] Specs cleanup: -A, -d and -m for linker
  2010-12-02 16:34 ` [2/9] Specs cleanup: -A, -d and -m for linker Joseph S. Myers
@ 2010-12-02 21:16   ` Mike Stump
  2010-12-03 11:28     ` Richard Guenther
  2010-12-03  0:25   ` DJ Delorie
  1 sibling, 1 reply; 26+ messages in thread
From: Mike Stump @ 2010-12-02 21:16 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Dec 2, 2010, at 8:33 AM, Joseph S. Myers wrote:
> LINK_COMMAND_SPEC (including modified copies for two targets) passes
> -A, -d and -m to the linker and has further %{!A:...} specs.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m.
> 	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
> 	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.

The darwin change is Ok, if the gcc.c change is approved (or considered obvious).

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [2/9] Specs cleanup: -A, -d and -m for linker
  2010-12-02 16:34 ` [2/9] Specs cleanup: -A, -d and -m for linker Joseph S. Myers
  2010-12-02 21:16   ` Mike Stump
@ 2010-12-03  0:25   ` DJ Delorie
  1 sibling, 0 replies; 26+ messages in thread
From: DJ Delorie @ 2010-12-03  0:25 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches


> 	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.

This is OK.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [2/9] Specs cleanup: -A, -d and -m for linker
  2010-12-02 21:16   ` Mike Stump
@ 2010-12-03 11:28     ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-03 11:28 UTC (permalink / raw)
  To: Mike Stump; +Cc: Joseph S. Myers, gcc-patches

On Thu, Dec 2, 2010 at 10:15 PM, Mike Stump <mikestump@comcast.net> wrote:
> On Dec 2, 2010, at 8:33 AM, Joseph S. Myers wrote:
>> LINK_COMMAND_SPEC (including modified copies for two targets) passes
>> -A, -d and -m to the linker and has further %{!A:...} specs.
>
>> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>>
>>       * gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m.
>>       * config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
>>       * config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.
>
> The darwin change is Ok, if the gcc.c change is approved (or considered obvious).

The gcc.c change is ok.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Ping Re: [3/9] Specs cleanup: -n and -T for assembler
  2010-12-02 16:36 ` [3/9] Specs cleanup: -n and -T for assembler Joseph S. Myers
@ 2010-12-09 11:30   ` Joseph S. Myers
  2010-12-09 12:52     ` Richard Guenther
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-09 11:30 UTC (permalink / raw)
  To: gcc-patches

Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00192.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Ping Re: [5/9] Specs cleanup: -dynamic-linker
  2010-12-02 16:36 ` [5/9] Specs cleanup: -dynamic-linker Joseph S. Myers
@ 2010-12-09 11:47   ` Joseph S. Myers
  2010-12-09 12:56     ` Richard Guenther
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-09 11:47 UTC (permalink / raw)
  To: gcc-patches

Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00194.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Ping Re: [6/9] Specs cleanup: -r* for linker
  2010-12-02 16:36 ` [6/9] Specs cleanup: -r* for linker Joseph S. Myers
@ 2010-12-09 11:57   ` Joseph S. Myers
  2010-12-09 13:42     ` Richard Guenther
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-09 11:57 UTC (permalink / raw)
  To: gcc-patches

Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00193.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Ping Re: [7/9] Specs cleanup: -v for assembler
  2010-12-02 16:37 ` [7/9] Specs cleanup: -v for assembler Joseph S. Myers
@ 2010-12-09 12:07   ` Joseph S. Myers
  2010-12-09 14:05     ` Richard Guenther
  0 siblings, 1 reply; 26+ messages in thread
From: Joseph S. Myers @ 2010-12-09 12:07 UTC (permalink / raw)
  To: gcc-patches

Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00195.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Ping Re: [3/9] Specs cleanup: -n and -T for assembler
  2010-12-09 11:30   ` Ping " Joseph S. Myers
@ 2010-12-09 12:52     ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-09 12:52 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

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
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Ping Re: [5/9] Specs cleanup: -dynamic-linker
  2010-12-09 11:47   ` Ping " Joseph S. Myers
@ 2010-12-09 12:56     ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-09 12:56 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

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/msg00194.html> is pending
> review.

Ok.

Thanks,
Richard.

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Ping Re: [6/9] Specs cleanup: -r* for linker
  2010-12-09 11:57   ` Ping " Joseph S. Myers
@ 2010-12-09 13:42     ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-09 13:42 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 9, 2010 at 12:30 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> Ping.  This patch
> <http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00193.html> is pending
> review.

Ok.

Thanks,
Richard.

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Ping Re: [7/9] Specs cleanup: -v for assembler
  2010-12-09 12:07   ` Ping " Joseph S. Myers
@ 2010-12-09 14:05     ` Richard Guenther
  0 siblings, 0 replies; 26+ messages in thread
From: Richard Guenther @ 2010-12-09 14:05 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On Thu, Dec 9, 2010 at 12:30 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> Ping.  This patch
> <http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00195.html> is pending
> review.

Ok.

Thanks,
Richard.

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-12-09 12:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 16:32 [0/9] Specs cleanup: introduction Joseph S. Myers
2010-12-02 16:33 ` [1/9] Specs cleanup: Specs cleanup: -Wa, and -Wl, Joseph S. Myers
2010-12-02 16:38   ` Richard Guenther
2010-12-02 16:34 ` [2/9] Specs cleanup: -A, -d and -m for linker Joseph S. Myers
2010-12-02 21:16   ` Mike Stump
2010-12-03 11:28     ` Richard Guenther
2010-12-03  0:25   ` DJ Delorie
2010-12-02 16:36 ` [5/9] Specs cleanup: -dynamic-linker Joseph S. Myers
2010-12-09 11:47   ` Ping " Joseph S. Myers
2010-12-09 12:56     ` Richard Guenther
2010-12-02 16:36 ` [3/9] Specs cleanup: -n and -T for assembler Joseph S. Myers
2010-12-09 11:30   ` Ping " Joseph S. Myers
2010-12-09 12:52     ` Richard Guenther
2010-12-02 16:36 ` [4/9] Specs cleanup: -ftraditional Joseph S. Myers
2010-12-02 16:40   ` Richard Guenther
2010-12-02 21:09     ` Mike Stump
2010-12-02 16:36 ` [6/9] Specs cleanup: -r* for linker Joseph S. Myers
2010-12-09 11:57   ` Ping " Joseph S. Myers
2010-12-09 13:42     ` Richard Guenther
2010-12-02 16:37 ` [9/9] Specs cleanup: -b Joseph S. Myers
2010-12-02 16:48   ` Richard Guenther
2010-12-02 16:37 ` [8/9] Specs cleanup: -V Joseph S. Myers
2010-12-02 16:47   ` Richard Guenther
2010-12-02 16:37 ` [7/9] Specs cleanup: -v for assembler Joseph S. Myers
2010-12-09 12:07   ` Ping " Joseph S. Myers
2010-12-09 14:05     ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).