diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-10 12:40:51 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-10 12:40:51 +0000 |
commit | 2c2747c3a205945930742dafc30b40ce377e5cc7 (patch) | |
tree | 243df70204f66b1998017f534c2c7f2ff08aa244 /gcc/config/darwin-driver.c | |
parent | ba2bc1397b89bdf0b59aa9542888444bcc7ce8dd (diff) | |
download | gcc-2c2747c3a205945930742dafc30b40ce377e5cc7.tar.gz |
* 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
Diffstat (limited to 'gcc/config/darwin-driver.c')
-rw-r--r-- | gcc/config/darwin-driver.c | 53 |
1 files changed, 51 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>. */ -#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 <sys/sysctl.h> #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 +} |