From 2c2747c3a205945930742dafc30b40ce377e5cc7 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Wed, 10 Nov 2010 12:40:51 +0000 Subject: * doc/tm.texi.in (TARGET_OPTION_TRANSLATE_TABLE): Remove. * doc/tm.texi: Regenerate. * opts-common.c (tm.h): Don't include. (target_option_translations): Remove. (decode_cmdline_options_to_array): Don't handle translating options. * system.h (TARGET_OPTION_TRANSLATE_TABLE): Poison. * config/darwin-driver.c: Don't condition includes on CROSS_DIRECTORY_STRUCTURE. (darwin_default_min_version): Make static. (darwin_driver_init): New. Call darwin_default_min_version if not CROSS_DIRECTORY_STRUCTURE. * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. (DRIVER_SELF_SPECS, DARWIN_CC1_SPEC): Define. (ASM_SPEC): Add %{static}. (darwin_default_min_version): Don't declare. (darwin_driver_init): Declare. (GCC_DRIVER_HOST_INITIALIZATION): Define to call darwin_driver_init, independent of CROSS_DIRECTORY_STRUCTURE. * config/darwin.opt (all_load, allowable_client, arch_errors_fatal, bind_at_load, bundle, bundle_loader, dead_strip, dependency-file, dylib_file, dynamic, dynamiclib, exported_symbols_list, filelist, findirect-virtual-calls, flat_namespace, force_cpusubtype_ALL, force_flat_namespace, framework, fterminated-vtables, gfull, gused, image_base, init, install_name, multi_module, multiply_defined, multiply_defined_unused, no_dead_strip_inits_and_terms, seg_addr_table, seg_addr_table_filename, segaddr, segs_read_only_addr, segs_read_write_addr, single_module, umbrella, unexported_symbols_list, weak_reference_mismatches, Zall_load, Zarch_errors_fatal, Zbind_at_load, Zbundle, Zdead_strip, Zdynamic, Zdynamiclib, Zflat_namespace, Zforce_cpusubtype_ALL, Zforce_flat_namespace, Zmulti_module, Zno_dead_strip_inits_and_terms, Zsingle_module): New. * config/i386/darwin.h (CC1_SPEC): Add DARWIN_CC1_SPEC. (ASM_SPEC): Add %{static}. (SUBTARGET_OPTION_TRANSLATE_TABLE): Remove. * config/mep/mep.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. (DRIVER_SELF_SPECS): Handle options formerly in TARGET_OPTION_TRANSLATE_TABLE. * config/mep/mep.opt (mfar): New. * config/picochip/picochip.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. (DRIVER_SELF_SPECS): Define. Handle options formerly in TARGET_OPTION_TRANSLATE_TABLE. * config/rs6000/darwin.h (CC1_SPEC): Handle -faltivec and -fno-altivec. (SUBTARGET_OPTION_TRANSLATE_TABLE): Remove. * config/rs6000/darwin.opt (Waltivec-long-deprecated, faltivec, ffix-and-continue, findirect-data): New. * config/rx/rx.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. * config/rx/rx.opt (nofpu): Make into alias of mnofpu. (mnofpu): Define mask and use Report here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166534 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 56 +++++++++++++++ gcc/config/darwin-driver.c | 53 +++++++++++++- gcc/config/darwin.h | 86 ++++------------------ gcc/config/darwin.opt | 157 +++++++++++++++++++++++++++++++++++++++++ gcc/config/i386/darwin.h | 11 ++- gcc/config/mep/mep.h | 19 ++--- gcc/config/mep/mep.opt | 3 + gcc/config/picochip/picochip.h | 26 +++---- gcc/config/rs6000/darwin.h | 20 ++---- gcc/config/rs6000/darwin.opt | 14 ++++ gcc/config/rx/rx.h | 4 -- gcc/config/rx/rx.opt | 4 +- gcc/doc/tm.texi | 20 ------ gcc/doc/tm.texi.in | 20 ------ gcc/opts-common.c | 90 +---------------------- gcc/system.h | 3 +- 16 files changed, 331 insertions(+), 255 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 984adac4350..91b407c382a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,59 @@ +2010-11-10 Joseph Myers + + * doc/tm.texi.in (TARGET_OPTION_TRANSLATE_TABLE): Remove. + * doc/tm.texi: Regenerate. + * opts-common.c (tm.h): Don't include. + (target_option_translations): Remove. + (decode_cmdline_options_to_array): Don't handle translating + options. + * system.h (TARGET_OPTION_TRANSLATE_TABLE): Poison. + * config/darwin-driver.c: Don't condition includes on + CROSS_DIRECTORY_STRUCTURE. + (darwin_default_min_version): Make static. + (darwin_driver_init): New. Call darwin_default_min_version if not + CROSS_DIRECTORY_STRUCTURE. + * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. + (DRIVER_SELF_SPECS, DARWIN_CC1_SPEC): Define. + (ASM_SPEC): Add %{static}. + (darwin_default_min_version): Don't declare. + (darwin_driver_init): Declare. + (GCC_DRIVER_HOST_INITIALIZATION): Define to call + darwin_driver_init, independent of CROSS_DIRECTORY_STRUCTURE. + * config/darwin.opt (all_load, allowable_client, + arch_errors_fatal, bind_at_load, bundle, bundle_loader, + dead_strip, dependency-file, dylib_file, dynamic, dynamiclib, + exported_symbols_list, filelist, findirect-virtual-calls, + flat_namespace, force_cpusubtype_ALL, force_flat_namespace, + framework, fterminated-vtables, gfull, gused, image_base, init, + install_name, multi_module, multiply_defined, + multiply_defined_unused, no_dead_strip_inits_and_terms, + seg_addr_table, seg_addr_table_filename, segaddr, + segs_read_only_addr, segs_read_write_addr, single_module, + umbrella, unexported_symbols_list, weak_reference_mismatches, + Zall_load, Zarch_errors_fatal, Zbind_at_load, Zbundle, + Zdead_strip, Zdynamic, Zdynamiclib, Zflat_namespace, + Zforce_cpusubtype_ALL, Zforce_flat_namespace, Zmulti_module, + Zno_dead_strip_inits_and_terms, Zsingle_module): New. + * config/i386/darwin.h (CC1_SPEC): Add DARWIN_CC1_SPEC. + (ASM_SPEC): Add %{static}. + (SUBTARGET_OPTION_TRANSLATE_TABLE): Remove. + * config/mep/mep.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. + (DRIVER_SELF_SPECS): Handle options formerly in + TARGET_OPTION_TRANSLATE_TABLE. + * config/mep/mep.opt (mfar): New. + * config/picochip/picochip.h (TARGET_OPTION_TRANSLATE_TABLE): + Remove. + (DRIVER_SELF_SPECS): Define. Handle options formerly in + TARGET_OPTION_TRANSLATE_TABLE. + * config/rs6000/darwin.h (CC1_SPEC): Handle -faltivec and + -fno-altivec. + (SUBTARGET_OPTION_TRANSLATE_TABLE): Remove. + * config/rs6000/darwin.opt (Waltivec-long-deprecated, faltivec, + ffix-and-continue, findirect-data): New. + * config/rx/rx.h (TARGET_OPTION_TRANSLATE_TABLE): Remove. + * config/rx/rx.opt (nofpu): Make into alias of mnofpu. + (mnofpu): Define mask and use Report here. + 2010-11-10 Andreas Krebbel * gcc/config/s390/s390.c (s390_emit_prologue): Report the stack diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 1123aa37c43..bf27336ce29 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -18,13 +18,14 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ -#ifndef CROSS_DIRECTORY_STRUCTURE #include "config.h" #include "system.h" #include "coretypes.h" #include "tm.h" #include "gcc.h" #include "opts.h" + +#ifndef CROSS_DIRECTORY_STRUCTURE #include #include "xregex.h" @@ -32,7 +33,7 @@ along with GCC; see the file COPYING3. If not see libraries, default the -mmacosx-version-min flag to be the version of the system on which the compiler is running. */ -void +static void darwin_default_min_version (unsigned int *decoded_options_count, struct cl_decoded_option **decoded_options) { @@ -138,3 +139,51 @@ darwin_default_min_version (unsigned int *decoded_options_count, } #endif /* CROSS_DIRECTORY_STRUCTURE */ + +/* Translate -filelist and -framework options in *DECODED_OPTIONS + (size *DECODED_OPTIONS_COUNT) to use -Xlinker so that they are + considered to be linker inputs in the case that no other inputs are + specified. Handling these options in DRIVER_SELF_SPECS does not + suffice because specs are too late to add linker inputs, and + handling them in LINK_SPEC does not suffice because the linker will + not be called if there are no other inputs. When native, also + default the -mmacosx-version-min flag. */ + +void +darwin_driver_init (unsigned int *decoded_options_count, + struct cl_decoded_option **decoded_options) +{ + unsigned int i; + + for (i = 1; i < *decoded_options_count; i++) + { + if ((*decoded_options)[i].errors & CL_ERR_MISSING_ARG) + continue; + switch ((*decoded_options)[i].opt_index) + { + case OPT_filelist: + case OPT_framework: + ++*decoded_options_count; + *decoded_options = XRESIZEVEC (struct cl_decoded_option, + *decoded_options, + *decoded_options_count); + memmove (*decoded_options + i + 2, + *decoded_options + i + 1, + ((*decoded_options_count - i - 2) + * sizeof (struct cl_decoded_option))); + generate_option (OPT_Xlinker, (*decoded_options)[i].arg, 1, + CL_DRIVER, &(*decoded_options)[i + 1]); + generate_option (OPT_Xlinker, + (*decoded_options)[i].canonical_option[0], 1, + CL_DRIVER, &(*decoded_options)[i]); + break; + + default: + break; + } + } + +#ifndef CROSS_DIRECTORY_STRUCTURE + darwin_default_min_version (decoded_options_count, decoded_options); +#endif +} diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index ffed58a1300..5a4be8a1a4f 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -123,71 +123,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* True if pragma ms_struct is in effect. */ extern GTY(()) int darwin_ms_struct; -/* This table intercepts weirdo options whose names would interfere - with normal driver conventions, and either translates them into - standardly-named options, or adds a 'Z' so that they can get to - specs processing without interference. - - Do not expand a linker option to "-Xlinker -