* common.opt (R, T, Tbss, Tdata, Ttext, h, z): New.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2010 23:40:53 +0000 (23:40 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2010 23:40:53 +0000 (23:40 +0000)
* defaults.h (DEFAULT_SWITCH_TAKES_ARG, SWITCH_TAKES_ARG): Remove.
(DEFAULT_WORD_SWITCH_TAKES_ARG): Define to 0.
* doc/tm.texi.in (SWITCH_TAKES_ARG): Remove.
(WORD_SWITCH_TAKES_ARG): Don't refer to SWITCH_TAKES_ARG.
Document that options in .opt files do not need to be included.
* doc/tm.texi: Regenerate.
* gcc.c (LINK_COMMAND_SPEC): Don't include %{x}.
* opts-common.c: Update comment on tm.h include.
(decode_cmdline_option): Don't use SWITCH_TAKES_ARG.
* system.h (SWITCH_TAKES_ARG): Poison.
* config/alpha/alpha.h (SWITCH_TAKES_ARG): Remove.
* config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove options included
in darwin.opt.
(LINK_COMMAND_SPEC_A): Don't include %{x}.
* config/fr30/fr30.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/freebsd-spec.h (FBSD_SWITCH_TAKES_ARG): Remove.
* config/freebsd.h (SWITCH_TAKES_ARG): Remove.
* config/frv/frv.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Don't include %{x}.
* config/ia64/ia64.h (SWITCH_TAKES_ARG): Remove.
* config/interix.h (WORD_SWITCH_TAKES_ARG): Don't handle -T
options.
* config/lm32/lm32.h (SWITCH_TAKES_ARG): Remove.
* config/m32r/m32r.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/microblaze/microblaze.h (SWITCH_TAKES_ARG): Remove.
* config/mips/mips.h (SWITCH_TAKES_ARG): Remove.
* config/mips/netbsd.h (SWITCH_TAKES_ARG): Remove.
* config/mips/vxworks.h (SWITCH_TAKES_ARG): Remove.
* config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove.
* config/netbsd-elf.h (SWITCH_TAKES_ARG): Remove.
* config/openbsd.h (SWITCH_TAKES_ARG): Remove.
* config/rs6000/sysv4.h (SWITCH_TAKES_ARG): Remove.
* config/score/score.h (SWITCH_TAKES_ARG): Remove.
* config/sol2.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sp-elf.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sp64-elf.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sparc.h (ASM_SPEC): Don't include %{R}.
* config/svr4.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166155 138bc75d-0d04-0410-961f-82ee72b054a4

33 files changed:
gcc/ChangeLog
gcc/common.opt
gcc/config/alpha/alpha.h
gcc/config/darwin.h
gcc/config/fr30/fr30.h
gcc/config/freebsd-spec.h
gcc/config/freebsd.h
gcc/config/frv/frv.h
gcc/config/i386/djgpp.h
gcc/config/ia64/ia64.h
gcc/config/interix.h
gcc/config/lm32/lm32.h
gcc/config/m32r/m32r.h
gcc/config/microblaze/microblaze.h
gcc/config/mips/mips.h
gcc/config/mips/netbsd.h
gcc/config/mips/vxworks.h
gcc/config/netbsd-aout.h
gcc/config/netbsd-elf.h
gcc/config/openbsd.h
gcc/config/rs6000/sysv4.h
gcc/config/score/score.h
gcc/config/sol2.h
gcc/config/sparc/sp-elf.h
gcc/config/sparc/sp64-elf.h
gcc/config/sparc/sparc.h
gcc/config/svr4.h
gcc/defaults.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/gcc.c
gcc/opts-common.c
gcc/system.h

index ed19253..0c2f666 100644 (file)
@@ -1,3 +1,48 @@
+2010-11-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * common.opt (R, T, Tbss, Tdata, Ttext, h, z): New.
+       * defaults.h (DEFAULT_SWITCH_TAKES_ARG, SWITCH_TAKES_ARG): Remove.
+       (DEFAULT_WORD_SWITCH_TAKES_ARG): Define to 0.
+       * doc/tm.texi.in (SWITCH_TAKES_ARG): Remove.
+       (WORD_SWITCH_TAKES_ARG): Don't refer to SWITCH_TAKES_ARG.
+       Document that options in .opt files do not need to be included.
+       * doc/tm.texi: Regenerate.
+       * gcc.c (LINK_COMMAND_SPEC): Don't include %{x}.
+       * opts-common.c: Update comment on tm.h include.
+       (decode_cmdline_option): Don't use SWITCH_TAKES_ARG.
+       * system.h (SWITCH_TAKES_ARG): Poison.
+       * config/alpha/alpha.h (SWITCH_TAKES_ARG): Remove.
+       * config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove options included
+       in darwin.opt.
+       (LINK_COMMAND_SPEC_A): Don't include %{x}.
+       * config/fr30/fr30.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
+       Remove.
+       * config/freebsd-spec.h (FBSD_SWITCH_TAKES_ARG): Remove.
+       * config/freebsd.h (SWITCH_TAKES_ARG): Remove.
+       * config/frv/frv.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
+       Remove.
+       * config/i386/djgpp.h (LINK_COMMAND_SPEC): Don't include %{x}.
+       * config/ia64/ia64.h (SWITCH_TAKES_ARG): Remove.
+       * config/interix.h (WORD_SWITCH_TAKES_ARG): Don't handle -T
+       options.
+       * config/lm32/lm32.h (SWITCH_TAKES_ARG): Remove.
+       * config/m32r/m32r.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
+       Remove.
+       * config/microblaze/microblaze.h (SWITCH_TAKES_ARG): Remove.
+       * config/mips/mips.h (SWITCH_TAKES_ARG): Remove.
+       * config/mips/netbsd.h (SWITCH_TAKES_ARG): Remove.
+       * config/mips/vxworks.h (SWITCH_TAKES_ARG): Remove.
+       * config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove.
+       * config/netbsd-elf.h (SWITCH_TAKES_ARG): Remove.
+       * config/openbsd.h (SWITCH_TAKES_ARG): Remove.
+       * config/rs6000/sysv4.h (SWITCH_TAKES_ARG): Remove.
+       * config/score/score.h (SWITCH_TAKES_ARG): Remove.
+       * config/sol2.h (SWITCH_TAKES_ARG): Remove.
+       * config/sparc/sp-elf.h (SWITCH_TAKES_ARG): Remove.
+       * config/sparc/sp64-elf.h (SWITCH_TAKES_ARG): Remove.
+       * config/sparc/sparc.h (ASM_SPEC): Don't include %{R}.
+       * config/svr4.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
+
 2010-11-01  Paul Koning  <ni1d@arrl.net>
 
        * config/pdp11/pdp11.md: Use iterators.
index a74d60d..cd8b0ad 100644 (file)
@@ -290,9 +290,24 @@ Ofast
 Common Optimization
 Optimize for speed disregarding exact standards compliance
 
+R
+Driver Joined Separate
+
 S
 Driver
 
+T
+Driver Joined Separate
+
+Tbss
+Driver Separate
+
+Tdata
+Driver Separate
+
+Ttext
+Driver Separate
+
 W
 Common RejectNegative Warning Alias(Wextra)
 This switch is deprecated; use -Wextra instead
@@ -1885,6 +1900,9 @@ gxcoff+
 Common JoinedOrMissing Negative(gcoff)
 Generate debug information in extended XCOFF format
 
+h
+Driver Joined Separate
+
 iplugindir=
 Common Joined Var(plugindir_string) Init(0)
 -iplugindir=<dir>      Set <dir> to be the default plugin directory
@@ -2026,4 +2044,7 @@ pie
 Common RejectNegative Negative(shared)
 Create a position independent executable
 
+z
+Driver Joined Separate
+
 ; This comment is to ensure we retain the blank line above.
index 21db01c..7681b4b 100644 (file)
@@ -96,9 +96,6 @@ along with GCC; see the file COPYING3.  If not see
   while (0)
 #endif
 
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 #define WORD_SWITCH_TAKES_ARG(STR)             \
  (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
 
index f6b88f9..cd938cf 100644 (file)
@@ -226,7 +226,6 @@ extern GTY(()) int darwin_ms_struct;
    !strcmp (STR, "sub_library") ? 1 :           \
    !strcmp (STR, "sub_umbrella") ? 1 :          \
    !strcmp (STR, "Zumbrella") ? 1 :             \
-   !strcmp (STR, "undefined") ? 1 :             \
    !strcmp (STR, "Zunexported_symbols_list") ? 1 : \
    !strcmp (STR, "Zweak_reference_mismatches") ? 1 : \
    !strcmp (STR, "pagezero_size") ? 1 :         \
@@ -236,7 +235,6 @@ extern GTY(()) int darwin_ms_struct;
    !strcmp (STR, "sectobjectsymbols") ? 2 :     \
    !strcmp (STR, "segcreate") ? 3 :             \
    !strcmp (STR, "dylinker_install_name") ? 1 : \
-   !strcmp (STR, "iframework") ? 1 : \
    0)
 
 #define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do {                        \
@@ -271,7 +269,7 @@ extern GTY(()) int darwin_ms_struct;
 #define LINK_COMMAND_SPEC_A \
    "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
     %(linker) %l %X %{d} %{s} %{t} %{Z} %{u*} \
-    %{A} %{e*} %{m} %{r} %{x} \
+    %{A} %{e*} %{m} %{r} \
     %{o*}%{!o:-o a.out} \
     %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
     %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
index 0ea72fd..ac42145 100644 (file)
@@ -22,15 +22,6 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 /*}}}*/ \f
-/*{{{  Driver configuration.  */ 
-
-/* Defined in svr4.h.  */
-#undef SWITCH_TAKES_ARG
-
-/* Defined in svr4.h.  */
-#undef WORD_SWITCH_TAKES_ARG
-
-/*}}}*/ \f
 /*{{{  Run-time target specifications.  */ 
 
 #undef  ASM_SPEC
index 84d8127..7e08e78 100644 (file)
@@ -1,5 +1,6 @@
 /* Base configuration file for all FreeBSD targets.
-   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -33,17 +34,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* In case we need to know.  */
 #define USING_CONFIG_FREEBSD_SPEC 1
 
-/* This defines which switch letters take arguments.  On FreeBSD, most of
-   the normal cases (defined in gcc.c) apply, and we also have -h* and
-   -z* options (for the linker) (coming from SVR4).
-   We also have -R (alias --rpath), no -z, --soname (-h), --assert etc.  */
-
-#define FBSD_SWITCH_TAKES_ARG(CHAR)                                    \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)                                     \
-    || (CHAR) == 'h'                                                   \
-    || (CHAR) == 'z' /* ignored by ld */                               \
-    || (CHAR) == 'R')
-
 /* This defines which multi-letter switches take arguments.  */
 
 #define FBSD_WORD_SWITCH_TAKES_ARG(STR)                                        \
index 591ce1a..8381189 100644 (file)
@@ -30,13 +30,8 @@ along with GCC; see the file COPYING3.  If not see
 /* In case we need to know.  */
 #define USING_CONFIG_FREEBSD 1
 
-/* This defines which switch letters take arguments.  On FreeBSD, most of
-   the normal cases (defined in gcc.c) apply, and we also have -h* and
-   -z* options (for the linker) (coming from SVR4).
-   We also have -R (alias --rpath), no -z, --soname (-h), --assert etc.  */
-
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
+/* This defines which switch words take arguments.
+   We have --assert etc.  */
 
 #undef  WORD_SWITCH_TAKES_ARG
 #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
index fc0f293..8a2907d 100644 (file)
 \f
 /* Driver configuration.  */
 
-/* A C expression which determines whether the option `-CHAR' takes arguments.
-   The value should be the number of arguments that option takes-zero, for many
-   options.
-
-   By default, this macro is defined to handle the standard options properly.
-   You need not define it unless you wish to add additional options which take
-   arguments.
-
-   Defined in svr4.h.  */
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                                          \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
-/* A C expression which determines whether the option `-NAME' takes arguments.
-   The value should be the number of arguments that option takes-zero, for many
-   options.  This macro rather than `SWITCH_TAKES_ARG' is used for
-   multi-character option names.
-
-   By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which
-   handles the standard options properly.  You need not define
-   `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take
-   arguments.  Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and
-   then check for additional options.
-
-   Defined in svr4.h.  */
-#undef WORD_SWITCH_TAKES_ARG
-
 /* -fpic and -fPIC used to imply the -mlibrary-pic multilib, but with
     FDPIC which multilib to use depends on whether FDPIC is in use or
     not.  The trick we use is to introduce -multilib-library-pic as a
index e95ee49..2a8cef6 100644 (file)
@@ -102,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
 #define LINK_COMMAND_SPEC \
 "%{!fsyntax-only: \
 %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
-\t%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
+\t%{r} %{s} %{t} %{u*} %{z} %{Z}\
 \t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
 \t%{static:} %{L*} %D %o\
 \t%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
index fbee1e7..fdac455 100644 (file)
@@ -53,9 +53,6 @@ do {                                          \
 
 #define ASM_EXTRA_SPEC ""
 
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 /* Variables which are this size or smaller are put in the sdata/sbss
    sections.  */
 extern unsigned int ia64_section_threshold;
index b94f357..67698a9 100644 (file)
@@ -1,6 +1,6 @@
 /* Operating system specific defines to be used when targeting GCC for
    Interix
-   Copyright (C) 1994, 1995, 1999, 2002, 2004, 2007
+   Copyright (C) 1994, 1995, 1999, 2002, 2004, 2007, 2010
    Free Software Foundation, Inc.
    Donn Terry, Softway Systems, Inc. (donn@softway.com)
    Modified from code
@@ -59,11 +59,9 @@ for windows/multi thread */
   "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}} %{shared:crti%O%s}"
 
 #undef WORD_SWITCH_TAKES_ARG
-#define WORD_SWITCH_TAKES_ARG(STR)                                     \
- ((DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                                 \
- || !strcmp(STR, "rpath"))                                             \
-  && strcmp (STR, "Tdata") && strcmp (STR, "Ttext")                    \
-  && strcmp (STR, "Tbss"))
+#define WORD_SWITCH_TAKES_ARG(STR)             \
+ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)          \
+  || !strcmp(STR, "rpath"))
 
 
 #define STDC_0_IN_SYSTEM_HEADERS 1
index bcea41a..c87c3bb 100644 (file)
 #undef  LIB_SPEC
 #define LIB_SPEC "%{!T*:-T sim.ld}"
 
-/* Add -G xx support.  */
-
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 #undef  CC1_SPEC
 #define CC1_SPEC "%{G*}"
 
index a645518..785d85b 100644 (file)
@@ -22,8 +22,6 @@
 - longlong.h?
 */
 
-#undef SWITCH_TAKES_ARG
-#undef WORD_SWITCH_TAKES_ARG
 #undef HANDLE_SYSV_PRAGMA
 #undef SIZE_TYPE
 #undef PTRDIFF_TYPE
 #define TARGET_VERSION fprintf (stderr, " (m32r)")
 #endif
 
-/* Switch  Recognition by gcc.c.  Add -G xx support.  */
-
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-(DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 /* Names to predefine in the preprocessor for this target machine.  */
 /* __M32R__ is defined by the existing compiler so we use that.  */
 #define TARGET_CPU_CPP_BUILTINS()              \
index 0145cb3..2ce22f1 100644 (file)
@@ -57,10 +57,6 @@ extern enum pipeline_type microblaze_pipe;
 /* Macros to decide whether certain features are available or not,
    depending on the instruction set architecture level.  */
 
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 #define DRIVER_SELF_SPECS                              \
        "%{mxl-soft-mul:%<mno-xl-soft-mul}",            \
        "%{mno-xl-barrel-shift:%<mxl-barrel-shift}",    \
index d6d909b..a367503 100644 (file)
@@ -1075,12 +1075,6 @@ enum mips_code_readable_setting {
 /* The CACHE instruction is available.  */
 #define ISA_HAS_CACHE (TARGET_CACHE_BUILTIN && !TARGET_MIPS16)
 \f
-/* Add -G xx support.  */
-
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 #define CONDITIONAL_REGISTER_USAGE mips_conditional_register_usage ()
 \f
 /* Tell collect what flags to pass to nm.  */
index 636e3ad..ff32858 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for MIPS NetBSD systems.
    Copyright (C) 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
-   2007 Free Software Foundation, Inc.
+   2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -170,16 +170,6 @@ along with GCC; see the file COPYING3.  If not see
 #define MIPS_DEFAULT_GVALUE 0
 
 
-/* This defines which switch letters take arguments.  -G is a MIPS
-   special.  */
-
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)                                     \
-   || (CHAR) == 'R'                                                    \
-   || (CHAR) == 'G')
-
-
 #undef ASM_FINAL_SPEC
 #undef SET_ASM_OP
 
index f77d62b..3c2d94f 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2003, 2004, 2007, 2008, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -19,15 +20,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef  TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (MIPS, VxWorks syntax)");
 
-/* Combination of mips.h and svr4.h.  */
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)          \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)      \
-   || (CHAR) == 'G'                     \
-   || (CHAR) == 'h'                     \
-   || (CHAR) == 'x'                     \
-   || (CHAR) == 'z')
-
 #undef  ASM_SPEC
 #define ASM_SPEC "\
 %{!G:-G 0} %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \
index 914212b..bf2bb9e 100644 (file)
@@ -1,5 +1,5 @@
 /* Common configuration file for NetBSD a.out targets.
-   Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
 This file is part of GCC.
@@ -26,13 +26,6 @@ along with GCC; see the file COPYING3.  If not see
     }                                          \
   while (0)
 
-/* This defines which switch letters take arguments.  */
-
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)         \
-  (DEFAULT_SWITCH_TAKES_ARG(CHAR)      \
-   || (CHAR) == 'R')
-
 
 /* Provide an ASM_SPEC appropriate for NetBSD.  Currently we only deal
    with the options for generating PIC code.  */
index 37f504b..f98cbe8 100644 (file)
@@ -1,5 +1,5 @@
 /* Common configuration file for NetBSD ELF targets.
-   Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
 This file is part of GCC.
@@ -26,18 +26,6 @@ along with GCC; see the file COPYING3.  If not see
     }                                          \
   while (0)
 
-/* This defines which switch letters take arguments.  On NetBSD, most
-   of the normal cases (defined by gcc.c) apply, and we also have -h*
-   and -z* options (for the linker) (coming from SVR4).  */
-
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                 \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)             \
-   || (CHAR) == 'h'                            \
-   || (CHAR) == 'z'                            \
-   || (CHAR) == 'R')
-
-
 /* Provide a STARTFILE_SPEC appropriate for NetBSD ELF.  Here we
    provide support for the special GCC option -static.  On ELF
    targets, we also add the crtbegin.o file, which provides part
index 30e1c25..d15dff1 100644 (file)
@@ -1,5 +1,6 @@
 /* Base configuration file for all OpenBSD targets.
-   Copyright (C) 1999, 2000, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2004, 2005, 2007, 2009, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -118,13 +119,6 @@ while (0)
 
 #ifndef OBSD_HAS_CORRECT_SPECS
 
-#ifndef OBSD_NO_DYNAMIC_LIBRARIES
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
-   || (CHAR) == 'R')
-#endif
-
 #undef CPP_SPEC
 #define CPP_SPEC OBSD_CPP_SPEC
 
index 6d88e32..04cc70e 100644 (file)
@@ -502,13 +502,6 @@ do {                                                                       \
                 reg_names[1]);                                         \
 } while (0)
 
-/* Switch  Recognition by gcc.c.  Add -G xx support.  */
-
-/* Override svr4.h definition.  */
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)                                         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 extern int fixuplabelno;
 
 /* Handle constructors specially for -mrelocatable.  */
index 4988704..1309a40 100644 (file)
 
 #include "score-conv.h"
 
-/* Controlling the Compilation Driver.  */
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
-
 #undef CPP_SPEC
 #define CPP_SPEC                 "%{mscore3:-D__score3__} %{G*}"
 
index 805b32f..72efdbd 100644 (file)
@@ -192,15 +192,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef SUPPORTS_INIT_PRIORITY
 #define SUPPORTS_INIT_PRIORITY 0
 
-/* This defines which switch letters take arguments.
-   It is as in svr4.h but with -R added.  */
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
-   || (CHAR) == 'R' \
-   || (CHAR) == 'h' \
-   || (CHAR) == 'z')
-
 #define STDC_0_IN_SYSTEM_HEADERS 1
 \f
 /*
index 3c50f71..8f0e892 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GCC,
    for SPARC running in an embedded environment using the ELF file format.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -45,15 +45,6 @@ along with GCC; see the file COPYING3.  If not see
 /* Don't set the target flags, this is done by the linker script */
 #undef LIB_SPEC
 #define LIB_SPEC ""
-
-/* This defines which switch letters take arguments.
-   It is as in svr4.h but with -R added.  */
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
-   || (CHAR) == 'R' \
-   || (CHAR) == 'h' \
-   || (CHAR) == 'z')
 \f
 #undef  LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX  "."
index a6ae027..e1820e0 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GCC, for SPARC64, ELF.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2004, 2005, 2007
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2004, 2005, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Doug Evans, dje@cygnus.com.
 
@@ -71,15 +71,6 @@ crtbegin.o%s \
 /* Use the default (for now).  */
 #undef LIB_SPEC
 
-/* This defines which switch letters take arguments.
-   It is as in svr4.h but with -R added.  */
-#undef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) \
-  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
-   || (CHAR) == 'R' \
-   || (CHAR) == 'h' \
-   || (CHAR) == 'z')
-
 #undef BYTES_BIG_ENDIAN
 #define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
 
index 3df1472..b7f0bd3 100644 (file)
@@ -450,7 +450,7 @@ extern enum cmodel sparc_cmodel;
 /* Special flags to the Sun-4 assembler when using pipe for input.  */
 
 #define ASM_SPEC "\
-%{R} %{!pg:%{!p:%{fpic|fPIC|fpie|fPIE:-k}}} %{keep-local-as-symbols:-L} \
+%{!pg:%{!p:%{fpic|fPIC|fpie|fPIE:-k}}} %{keep-local-as-symbols:-L} \
 %(asm_cpu) %(asm_relax)"
 
 #define AS_NEEDS_DASH_FOR_PIPED_INPUT
index 1a48130..f45706b 100644 (file)
@@ -1,7 +1,7 @@
 /* Operating system specific defines to be used when targeting GCC for some
    generic System V Release 4 system.
    Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2000, 2001, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com).
 
 This file is part of GCC.
@@ -41,26 +41,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* Cpp, assembler, linker, library, and startfile spec's.  */
 
-/* This defines which switch letters take arguments.  On svr4, most of
-   the normal cases (defined in gcc.c) apply, and we also have -h* and
-   -z* options (for the linker).  Note however that there is no such
-   thing as a -T option for svr4.  */
-
-#undef  SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR)         \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)     \
-   || (CHAR) == 'h'                    \
-   || (CHAR) == 'x'                    \
-   || (CHAR) == 'z')
-
-/* This defines which multi-letter switches take arguments.  On svr4,
-   there are no such switches except those implemented by GCC itself.  */
-
-#define WORD_SWITCH_TAKES_ARG(STR)                     \
- (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                  \
-  && strcmp (STR, "Tdata") && strcmp (STR, "Ttext")    \
-  && strcmp (STR, "Tbss"))
-
 /* Provide an ASM_SPEC appropriate for svr4.
    If we're not using GAS, we try to support as
    many of the specialized svr4 assembler options as seems reasonable,
index 1736013..b03abfb 100644 (file)
@@ -32,33 +32,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
 #endif
 
-/* This defines which switch letters take arguments.  */
-
-#define DEFAULT_SWITCH_TAKES_ARG(CHAR) \
-  ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
-   || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
-   || (CHAR) == 'I' || (CHAR) == 'J' || (CHAR) == 'm' \
-   || (CHAR) == 'x' || (CHAR) == 'L' || (CHAR) == 'A' \
-   || (CHAR) == 'B' || (CHAR) == 'd')
-
 /* This defines which multi-letter switches take arguments.  */
 
-#define DEFAULT_WORD_SWITCH_TAKES_ARG(STR)             \
- (!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext")     \
-  || !strcmp (STR, "Tbss") || !strcmp (STR, "include") \
-  || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
-  || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
-  || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
-  || !strcmp (STR, "iquote") || !strcmp (STR, "isystem") \
-  || !strcmp (STR, "isysroot") || !strcmp (STR, "imultilib") \
-  || !strcmp (STR, "-param") || !strcmp (STR, "specs") \
-  || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ") \
-  || !strcmp (STR, "fintrinsic-modules-path") \
-  || !strcmp (STR, "dumpbase") || !strcmp (STR, "dumpdir"))
-
-#ifndef SWITCH_TAKES_ARG
-#define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG (CHAR)
-#endif
+#define DEFAULT_WORD_SWITCH_TAKES_ARG(STR)             0
 
 #ifndef WORD_SWITCH_TAKES_ARG
 #define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
index 0c2db47..9126d43 100644 (file)
@@ -99,24 +99,12 @@ from being defined in the @file{.h} file to being part of the
 @c prevent bad page break with this line
 You can control the compilation driver.
 
-@defmac SWITCH_TAKES_ARG (@var{char})
-A C expression which determines whether the option @option{-@var{char}}
-takes arguments.  The value should be the number of arguments that
-option takes--zero, for many options.
-
-By default, this macro is defined as
-@code{DEFAULT_SWITCH_TAKES_ARG}, which handles the standard options
-properly.  You need not define @code{SWITCH_TAKES_ARG} unless you
-wish to add additional options which take arguments.  Any redefinition
-should call @code{DEFAULT_SWITCH_TAKES_ARG} and then check for
-additional options.
-@end defmac
-
 @defmac WORD_SWITCH_TAKES_ARG (@var{name})
 A C expression which determines whether the option @option{-@var{name}}
 takes arguments.  The value should be the number of arguments that
-option takes--zero, for many options.  This macro rather than
-@code{SWITCH_TAKES_ARG} is used for multi-character option names.
+option takes--zero, for many options.
+This macro does not need to handle options defined in @file{.opt}
+files, only those that are handled purely through specs.
 
 By default, this macro is defined as
 @code{DEFAULT_WORD_SWITCH_TAKES_ARG}, which handles the standard options
index c4d5e8a..2c36a76 100644 (file)
@@ -99,24 +99,12 @@ from being defined in the @file{.h} file to being part of the
 @c prevent bad page break with this line
 You can control the compilation driver.
 
-@defmac SWITCH_TAKES_ARG (@var{char})
-A C expression which determines whether the option @option{-@var{char}}
-takes arguments.  The value should be the number of arguments that
-option takes--zero, for many options.
-
-By default, this macro is defined as
-@code{DEFAULT_SWITCH_TAKES_ARG}, which handles the standard options
-properly.  You need not define @code{SWITCH_TAKES_ARG} unless you
-wish to add additional options which take arguments.  Any redefinition
-should call @code{DEFAULT_SWITCH_TAKES_ARG} and then check for
-additional options.
-@end defmac
-
 @defmac WORD_SWITCH_TAKES_ARG (@var{name})
 A C expression which determines whether the option @option{-@var{name}}
 takes arguments.  The value should be the number of arguments that
-option takes--zero, for many options.  This macro rather than
-@code{SWITCH_TAKES_ARG} is used for multi-character option names.
+option takes--zero, for many options.
+This macro does not need to handle options defined in @file{.opt}
+files, only those that are handled purely through specs.
 
 By default, this macro is defined as
 @code{DEFAULT_WORD_SWITCH_TAKES_ARG}, which handles the standard options
index 13635d5..c016a5c 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -665,7 +665,7 @@ proper position among the other output files.  */
     %{flto:%<fcompare-debug*} %{fwhopr*:%<fcompare-debug*} \
     %{flto} %{fwhopr*} %l " LINK_PIE_SPEC \
    "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
-    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+    %{s} %{t} %{u*} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
     %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
     %(mflib) " STACK_SPLIT_SPEC "\
index 553e8b1..ab4b1b2 100644 (file)
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "opts.h"
 #include "flags.h"
 #include "diagnostic.h"
-#include "tm.h" /* For SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG and
+#include "tm.h" /* For WORD_SWITCH_TAKES_ARG and
                   TARGET_OPTION_TRANSLATE_TABLE.  */
 
 static void prune_options (struct cl_decoded_option **, unsigned int *);
@@ -507,13 +507,10 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
     {
       /* Skip the correct number of arguments for options handled
         through specs.  */
-      const char *popt = argv[0] + 1;
-      int c = *popt;
+      const char *popt ATTRIBUTE_UNUSED = argv[0] + 1;
 
       gcc_assert (result == 1);
-      if (SWITCH_TAKES_ARG (c) > (popt[1] != 0))
-       result += SWITCH_TAKES_ARG (c) - (popt[1] != 0);
-      else if (WORD_SWITCH_TAKES_ARG (popt))
+      if (WORD_SWITCH_TAKES_ARG (popt))
        result += WORD_SWITCH_TAKES_ARG (popt);
       if (result > 1)
        for (i = 1; i < result; i++)
index ef0c462..65b5236 100644 (file)
@@ -776,7 +776,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
        STACK_CHECK_PROBE_INTERVAL STACK_CHECK_PROBE_LOAD                  \
        ORDER_REGS_FOR_LOCAL_ALLOC FUNCTION_OUTGOING_VALUE                 \
        ASM_DECLARE_CONSTANT_NAME MODIFY_TARGET_NAME SWITCHES_NEED_SPACES  \
-       SWITCH_CURTAILS_COMPILATION
+       SWITCH_CURTAILS_COMPILATION SWITCH_TAKES_ARG
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \