Patchwork [8/9] Specs cleanup: -V

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

Comments

Joseph S. Myers - Dec. 2, 2010, 4:37 p.m.
Until it was removed, -V was a GCC option to cause the driver to run a
Richard Guenther - Dec. 2, 2010, 4:47 p.m.
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
>

Patch

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)"