From f37ef985f35a963f06b8112872899cb9d6811969 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Mon, 1 Nov 2010 23:40:53 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166155 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 45 ++++++++++++++++++++++++++++++++++++++ gcc/common.opt | 21 ++++++++++++++++++ gcc/config/alpha/alpha.h | 3 --- gcc/config/darwin.h | 4 +--- gcc/config/fr30/fr30.h | 9 -------- gcc/config/freebsd-spec.h | 14 ++---------- gcc/config/freebsd.h | 9 ++------ gcc/config/frv/frv.h | 27 ----------------------- gcc/config/i386/djgpp.h | 2 +- gcc/config/ia64/ia64.h | 3 --- gcc/config/interix.h | 10 ++++----- gcc/config/lm32/lm32.h | 6 ----- gcc/config/m32r/m32r.h | 8 ------- gcc/config/microblaze/microblaze.h | 4 ---- gcc/config/mips/mips.h | 6 ----- gcc/config/mips/netbsd.h | 12 +--------- gcc/config/mips/vxworks.h | 12 ++-------- gcc/config/netbsd-aout.h | 9 +------- gcc/config/netbsd-elf.h | 14 +----------- gcc/config/openbsd.h | 10 ++------- gcc/config/rs6000/sysv4.h | 7 ------ gcc/config/score/score.h | 5 ----- gcc/config/sol2.h | 9 -------- gcc/config/sparc/sp-elf.h | 11 +--------- gcc/config/sparc/sp64-elf.h | 11 +--------- gcc/config/sparc/sparc.h | 2 +- gcc/config/svr4.h | 22 +------------------ gcc/defaults.h | 26 +--------------------- gcc/doc/tm.texi | 18 +++------------ gcc/doc/tm.texi.in | 18 +++------------ gcc/gcc.c | 2 +- gcc/opts-common.c | 9 +++----- gcc/system.h | 2 +- 33 files changed, 99 insertions(+), 271 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed1925366dd..0c2f666a467 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,48 @@ +2010-11-01 Joseph Myers + + * 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 * config/pdp11/pdp11.md: Use iterators. diff --git a/gcc/common.opt b/gcc/common.opt index a74d60da620..cd8b0adfff1 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -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= Set 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. diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 21db01c8ec5..7681b4ba5b5 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -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)) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index f6b88f97c98..cd938cf6fbf 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -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} \ diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h index 0ea72fd8c7c..ac42145f314 100644 --- a/gcc/config/fr30/fr30.h +++ b/gcc/config/fr30/fr30.h @@ -22,15 +22,6 @@ along with GCC; see the file COPYING3. If not see . */ /*}}}*/ -/*{{{ Driver configuration. */ - -/* Defined in svr4.h. */ -#undef SWITCH_TAKES_ARG - -/* Defined in svr4.h. */ -#undef WORD_SWITCH_TAKES_ARG - -/*}}}*/ /*{{{ Run-time target specifications. */ #undef ASM_SPEC diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h index 84d81278af8..7e08e787007 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h @@ -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) \ diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h index 591ce1a6667..83811891cf3 100644 --- a/gcc/config/freebsd.h +++ b/gcc/config/freebsd.h @@ -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)) diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index fc0f2930dc3..8a2907d682c 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -35,33 +35,6 @@ /* 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 diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h index e95ee49365b..2a8cef6842b 100644 --- a/gcc/config/i386/djgpp.h +++ b/gcc/config/i386/djgpp.h @@ -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}}\ diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index fbee1e719b6..fdac455c6df 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -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; diff --git a/gcc/config/interix.h b/gcc/config/interix.h index b94f35726de..67698a92a51 100644 --- a/gcc/config/interix.h +++ b/gcc/config/interix.h @@ -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 diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h index bcea41aa3a1..c87c3bb705a 100644 --- a/gcc/config/lm32/lm32.h +++ b/gcc/config/lm32/lm32.h @@ -68,12 +68,6 @@ #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*}" diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index a645518cbc1..785d85b5ea5 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -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 @@ -94,12 +92,6 @@ #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() \ diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h index 0145cb35952..2ce22f1e030 100644 --- a/gcc/config/microblaze/microblaze.h +++ b/gcc/config/microblaze/microblaze.h @@ -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:% (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++) diff --git a/gcc/system.h b/gcc/system.h index ef0c4628b43..65b523604b9 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -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 \ -- 2.11.0