Patchwork [9/9] Specs cleanup: -b

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

Comments

Joseph S. Myers - Dec. 2, 2010, 4:37 p.m.
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}.
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, -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
>

Patch

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} \