* 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.
From-SVN: r166534
+2010-11-10 Joseph Myers <joseph@codesourcery.com>
+
+ * 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 <Andreas.Krebbel@de.ibm.com>
* gcc/config/s390/s390.c (s390_emit_prologue): Report the stack
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"
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)
{
}
#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
+}
/* 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 -<option>", since that
- forfeits the ability to control via spec strings later. However,
- as a special exception, do this translation with -filelist, because
- otherwise the driver will think there are no input files and quit.
- (The alternative would be to hack the driver to recognize -filelist
- specially, but it's simpler to use the translation table.)
-
- Note that an option name with a prefix that matches another option
- name, that also takes an argument, needs to be modified so the
- prefix is different, otherwise a '*' after the shorter option will
- match with the longer one.
-
- The SUBTARGET_OPTION_TRANSLATE_TABLE macro, which _must_ be defined
- in gcc/config/{i386,rs6000}/darwin.h, should contain any additional
- command-line option translations specific to the particular target
- architecture. */
-
-#define TARGET_OPTION_TRANSLATE_TABLE \
- { "-all_load", "-Zall_load" }, \
- { "-allowable_client", "-Zallowable_client" }, \
- { "-arch_errors_fatal", "-Zarch_errors_fatal" }, \
- { "-bind_at_load", "-Zbind_at_load" }, \
- { "-bundle", "-Zbundle" }, \
- { "-bundle_loader", "-Zbundle_loader" }, \
- { "-weak_reference_mismatches", "-Zweak_reference_mismatches" }, \
- { "-dead_strip", "-Zdead_strip" }, \
- { "-no_dead_strip_inits_and_terms", "-Zno_dead_strip_inits_and_terms" }, \
- { "-dependency-file", "-MF" }, \
- { "-dylib_file", "-Zdylib_file" }, \
- { "-dynamic", "-Zdynamic" }, \
- { "-dynamiclib", "-Zdynamiclib" }, \
- { "-exported_symbols_list", "-Zexported_symbols_list" }, \
- { "-gfull", "-g -fno-eliminate-unused-debug-symbols" }, \
- { "-gused", "-g -feliminate-unused-debug-symbols" }, \
- { "-segaddr", "-Zsegaddr" }, \
- { "-segs_read_only_addr", "-Zsegs_read_only_addr" }, \
- { "-segs_read_write_addr", "-Zsegs_read_write_addr" }, \
- { "-seg_addr_table", "-Zseg_addr_table" }, \
- { "-seg_addr_table_filename", "-Zfn_seg_addr_table_filename" }, \
- { "-umbrella", "-Zumbrella" }, \
- { "-fapple-kext", "-fapple-kext -static -Wa,-static" }, \
- { "-filelist", "-Xlinker -filelist -Xlinker" }, \
- { "-findirect-virtual-calls", "-fapple-kext" }, \
- { "-flat_namespace", "-Zflat_namespace" }, \
- { "-force_cpusubtype_ALL", "-Zforce_cpusubtype_ALL" }, \
- { "-force_flat_namespace", "-Zforce_flat_namespace" }, \
- { "-framework", "-Xlinker -framework -Xlinker" }, \
- { "-fterminated-vtables", "-fapple-kext" }, \
- { "-image_base", "-Zimage_base" }, \
- { "-init", "-Zinit" }, \
- { "-install_name", "-Zinstall_name" }, \
- { "-mkernel", "-mkernel -static -Wa,-static" }, \
- { "-multiply_defined_unused", "-Zmultiplydefinedunused" }, \
- { "-multiply_defined", "-Zmultiply_defined" }, \
- { "-multi_module", "-Zmulti_module" }, \
- { "-static", "-static -Wa,-static" }, \
- { "-shared", "-Zdynamiclib" }, \
- { "-single_module", "-Zsingle_module" }, \
- { "-unexported_symbols_list", "-Zunexported_symbols_list" }, \
- SUBTARGET_OPTION_TRANSLATE_TABLE
+#define DRIVER_SELF_SPECS \
+ "%{gfull:-g -fno-eliminate-unused-debug-symbols} %<gfull", \
+ "%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
+ "%{fapple-kext|mkernel:-static}", \
+ "%{shared:-Zdynamiclib} %<shared"
+
+#define DARWIN_CC1_SPEC \
+ "%{findirect-virtual-calls: -fapple-kext} %<findirect-virtual-calls " \
+ "%{fterminated-vtables: -fapple-kext} %<fterminated-vtables " \
+ "%<filelist* %<framework*"
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
do { \
/* Default Darwin ASM_SPEC, very simple. */
#define ASM_SPEC "-arch %(darwin_arch) \
- %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL}"
+ %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
+ %{static}"
/* We still allow output of STABS. */
#define TARGET_HAS_TARGETCM 1
-#ifndef CROSS_DIRECTORY_STRUCTURE
-extern void darwin_default_min_version (unsigned int *decoded_options_count,
- struct cl_decoded_option **decoded_options);
+extern void darwin_driver_init (unsigned int *decoded_options_count,
+ struct cl_decoded_option **decoded_options);
#define GCC_DRIVER_HOST_INITIALIZATION \
- darwin_default_min_version (&decoded_options_count, &decoded_options)
-#endif /* CROSS_DIRECTORY_STRUCTURE */
+ darwin_driver_init (&decoded_options_count, &decoded_options)
/* The Apple assembler and linker do not support constructor priorities. */
#undef SUPPORTS_INIT_PRIORITY
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
+; Various linker options have a -Z added so that they can get to specs
+; processing without interference. Note that an option name with a
+; prefix that matches another option name, that also takes an
+; argument, being mapped to a -Z linker option, needs to be modified
+; so the prefix is different, otherwise a '*' after the shorter option
+; will match with the longer one.
+
+all_load
+Driver Alias(Zall_load)
+
+allowable_client
+Driver Separate Alias(Zallowable_client)
+
+arch_errors_fatal
+Driver Alias(Zarch_errors_fatal)
+
+bind_at_load
+Driver Alias(Zbind_at_load)
+
+bundle
+Driver Alias(Zbundle)
+
+bundle_loader
+Driver Separate Alias(Zbundle_loader)
+
+dead_strip
+Driver Alias(Zdead_strip)
+
+dependency-file
+C ObjC C++ ObjC++ Separate Alias(MF) MissingArgError(missing filename after %qs)
+
+dylib_file
+Driver Separate Alias(Zdylib_file)
+
+dynamic
+Driver Alias(Zdynamic)
+
+dynamiclib
+Driver Alias(Zdynamiclib)
+
+exported_symbols_list
+Driver Separate Alias(Zexported_symbols_list)
+
+filelist
+Driver RejectNegative Separate
+
+findirect-virtual-calls
+Driver RejectNegative
+
+flat_namespace
+Driver RejectNegative Alias(Zflat_namespace)
+
+force_cpusubtype_ALL
+Driver RejectNegative Alias(Zforce_cpusubtype_ALL)
+
+force_flat_namespace
+Driver RejectNegative Alias(Zforce_flat_namespace)
+
+framework
+Driver RejectNegative Separate
+
+fterminated-vtables
+Driver RejectNegative
+
+gfull
+Driver
+
+gused
+Driver
+
+image_base
+Driver Separate Alias(Zimage_base)
+
+init
+Driver Separate Alias(Zinit)
+
+install_name
+Driver Separate Alias(Zinstall_name)
+
mconstant-cfstrings
Target Report Var(darwin_constant_cfstrings) Init(1)
Generate compile-time CFString objects
+multi_module
+Driver RejectNegative Alias(Zmulti_module)
+
+multiply_defined
+Driver RejectNegative Separate Alias(Zmultiply_defined)
+
+multiply_defined_unused
+Driver RejectNegative Separate Alias(Zmultiplydefinedunused)
+
+no_dead_strip_inits_and_terms
+Driver Alias(Zno_dead_strip_inits_and_terms)
+
+seg_addr_table
+Driver Separate Alias(Zseg_addr_table)
+
+seg_addr_table_filename
+Driver Separate Alias(Zfn_seg_addr_table_filename)
+
+segaddr
+Driver Separate Args(2) Alias(Zsegaddr)
+
+segs_read_only_addr
+Driver Separate Alias(Zsegs_read_only_addr)
+
+segs_read_write_addr
+Driver Separate Alias(Zsegs_read_write_addr)
+
+single_module
+Driver Alias(Zsingle_module)
+
+umbrella
+Driver Separate Alias(Zumbrella)
+
+unexported_symbols_list
+Driver Separate Alias(Zunexported_symbols_list)
+
+weak_reference_mismatches
+Driver Separate Alias(Zweak_reference_mismatches)
+
Wnonportable-cfstrings
Target Report Var(darwin_warn_nonportable_cfstrings) Init(1) Warning
Warn if constant CFString objects contain non-portable characters
Target RejectNegative C ObjC C++ ObjC++ Joined Separate
-iframework <dir> Add <dir> to the end of the system framework include path
+Zall_load
+Driver
+
Zallowable_client
Driver Separate
+Zarch_errors_fatal
+Driver
+
+Zbind_at_load
+Driver
+
+Zbundle
+Driver
+
Zbundle_loader
Driver Separate
+Zdead_strip
+Driver
+
Zdylib_file
Driver Separate
+Zdynamic
+Driver
+
+Zdynamiclib
+Driver
+
Zexported_symbols_list
Driver Separate
Zfn_seg_addr_table_filename
Driver Separate
+Zflat_namespace
+Driver
+
+Zforce_cpusubtype_ALL
+Driver
+
+Zforce_flat_namespace
+Driver
+
Zimage_base
Driver Separate
Zinstall_name
Driver Separate
+Zmulti_module
+Driver
+
Zmultiply_defined
Driver Separate
Zmultiplydefinedunused
Driver Separate
+Zno_dead_strip_inits_and_terms
+Driver
+
Zseg_addr_table
Driver Separate
Zsegs_read_write_addr
Driver Separate
+Zsingle_module
+Driver
+
Zumbrella
Driver Separate
#define CC1_SPEC "%(cc1_cpu) \
%{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
%{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
- %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
+ %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }} " \
+ DARWIN_CC1_SPEC
#undef ASM_SPEC
-#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL"
+#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL \
+ %{static}"
#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}"
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
{ "darwin_crt2", "" }, \
{ "darwin_subarch", DARWIN_SUBARCH_SPEC },
-/* Use the following macro for any Darwin/x86-specific command-line option
- translation. */
-#define SUBTARGET_OPTION_TRANSLATE_TABLE \
- { "", "" }
-
/* The Darwin assembler mostly follows AT&T syntax. */
#undef ASSEMBLER_DIALECT
#define ASSEMBLER_DIALECT ASM_ATT
#define TARGET_VERSION fprintf (stderr, " (Toshiba Media Processor (MeP))");
-/* The MeP config tool will add TARGET_OPTION_TRANSLATE_TABLE here. */
-#define TARGET_OPTION_TRANSLATE_TABLE \
- {"-mall-opts", "-maverage -mmult -mdiv -mbitops -mleadz \
- -mabsdiff -mminmax -mclip -msatur -mdebug" }, \
- {"-mno-opts", "-mno-average -mno-mult -mno-div -mno-bitops -mno-leadz \
- -mno-absdiff -mno-minmax -mno-clip -mno-satur -mno-debug" }, \
- {"-mfar", "-ml -mtf -mc=far" } \
-/* start-target-option-table */ \
-, {"-mconfig=default", "-mconfig=default -mmult -mdiv -D__MEP_CONFIG_ISA=1" } \
-/* end-target-option-table */
-
/* The MeP config tool will replace this as appropriate. */
#define DEFAULT_ENDIAN_SPEC "%{!meb: -mel}"
/* Don't add an endian option when building the libraries. */
#define DRIVER_SELF_SPECS \
"%{!mlibrary:" DEFAULT_ENDIAN_SPEC "}", \
- "%{mlibrary: " LIBRARY_CONFIG_SPEC " %{!mel:-meb}}"
+ "%{mlibrary: " LIBRARY_CONFIG_SPEC " %{!mel:-meb}}", \
+ "%{mall-opts:-maverage -mmult -mdiv -mbitops -mleadz \
+ -mabsdiff -mminmax -mclip -msatur -mdebug} %<mall-opts", \
+ "%{mno-opts:-mno-average -mno-mult -mno-div -mno-bitops -mno-leadz \
+ -mno-absdiff -mno-minmax -mno-clip -mno-satur -mno-debug} %<mno-opts", \
+ "%{mfar:-ml -mtf -mc=far} %<mfar", \
+ "%{mconfig=default:-mmult -mdiv -D__MEP_CONFIG_ISA=1}"
/* The MeP config tool will add COPROC_SELECTION_TABLE here. */
/* start-coproc-selection-table */
Target Mask(LITTLE_ENDIAN) RejectNegative
Use little-endian byte order
+mfar
+Driver RejectNegative
+
mio-volatile
Target Mask(IO_VOLATILE)
__io vars are volatile by default
/* Translate requests for particular AEs into their respective ISA
options. Note that byte access is enabled by default. */
-#define TARGET_OPTION_TRANSLATE_TABLE \
- { "-mae=ANY", "-mmul-type=none -mno-byte-access" }, \
- { "-mae=ANY2", "-mmul-type=none -mno-byte-access" }, \
- { "-mae=ANY3", "-mmul-type=none" }, \
- { "-mae=STAN", "-mmul-type=none -mno-byte-access" }, \
- { "-mae=STAN2", "-mmul-type=mac -mno-byte-access" }, \
- { "-mae=STAN3", "-mmul-type=mac " }, \
- { "-mae=MAC", "-mmul-type=mac -mno-byte-access" }, \
- { "-mae=MUL", "-mmul-type=mul" }, \
- { "-mae=MEM", "-mmul-type=mul" }, \
- { "-mae=MEM2", "-mmul-type=mul" }, \
- { "-mae=CTRL", "-mmul-type=mul" }, \
- { "-mae=CTRL2", "-mmul-type=mul" }
+#define DRIVER_SELF_SPECS \
+ "%{mae=ANY:-mmul-type=none -mno-byte-access} %<mae=ANY", \
+ "%{mae=ANY2:-mmul-type=none -mno-byte-access} %<mae=ANY2", \
+ "%{mae=ANY3:-mmul-type=none} %<mae=ANY3", \
+ "%{mae=STAN:-mmul-type=none -mno-byte-access} %<mae=STAN", \
+ "%{mae=STAN2:-mmul-type=mac -mno-byte-access} %<mae=STAN2", \
+ "%{mae=STAN3:-mmul-type=mac} %<mae=STAN3", \
+ "%{mae=MAC:-mmul-type=mac -mno-byte-access} %<mae=MAC", \
+ "%{mae=MUL:-mmul-type=mul} %<mae=MUL", \
+ "%{mae=MEM:-mmul-type=mul} %<mae=MEM", \
+ "%{mae=MEM2:-mmul-type=mul} %<mae=MEM2", \
+ "%{mae=CTRL:-mmul-type=mul} %<mae=CTRL", \
+ "%{mae=CTRL2:-mmul-type=mul} %<mae=CTRL2"
/* Specify the default options, so that the multilib build doesn't
need to provide special cases for the defaults. */
/* We want -fPIC by default, unless we're using -static to compile for
- the kernel or some such. */
+ the kernel or some such. The "-faltivec" option should have been
+ called "-maltivec" all along. */
#define CC1_SPEC "\
%(cc1_cpu) \
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }} \
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
%{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
- %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}}"
+ %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
+ %{faltivec:-maltivec -include altivec.h} %{fno-altivec:-mno-altivec} \
+ %<faltivec %<fno-altivec " \
+ DARWIN_CC1_SPEC
#define DARWIN_ARCH_SPEC "%{m64:ppc64;:ppc}"
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START rs6000_darwin_file_start
-/* The "-faltivec" option should have been called "-maltivec" all
- along. -ffix-and-continue and -findirect-data is for compatibility
- for old compilers. */
-
-#define SUBTARGET_OPTION_TRANSLATE_TABLE \
- { "-ffix-and-continue", "-mfix-and-continue" }, \
- { "-findirect-data", "-mfix-and-continue" }, \
- { "-faltivec", "-maltivec -include altivec.h" }, \
- { "-fno-altivec", "-mno-altivec" }, \
- { "-Waltivec-long-deprecated", "-mwarn-altivec-long" }, \
- { "-Wno-altivec-long-deprecated", "-mno-warn-altivec-long" }
-
/* Make both r2 and r13 available for allocation. */
#define FIXED_R2 0
#define FIXED_R13 0
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
+Waltivec-long-deprecated
+Driver Alias(mwarn-altivec-long)
+
+faltivec
+Driver
+
+; -ffix-and-continue and -findirect-data are for compatibility for old
+; compilers.
+ffix-and-continue
+Driver RejectNegative Alias(mfix-and-continue)
+
+findirect-data
+Driver RejectNegative Alias(mfix-and-continue)
+
m64
Target RejectNegative Negative(m32) Mask(64BIT)
Generate 64-bit code
#define ARG_POINTER_CFA_OFFSET(FNDECL) 4
#define FRAME_POINTER_CFA_OFFSET(FNDECL) 4
\f
-/* Translate -nofpu into -mnofpu so that it gets passed from gcc to cc1. */
-#define TARGET_OPTION_TRANSLATE_TABLE \
- {"-nofpu", "-mnofpu" }
-
#define TARGET_USE_FPU (! TARGET_NO_USE_FPU)
/* This macro is used to decide when RX FPU instructions can be used. */
Stores doubles in 32 bits. This is the default.
nofpu
-Target RejectNegative Mask(NO_USE_FPU) Report
+Target RejectNegative Alias(mnofpu)
Disable the use of RX FPU instructions.
mnofpu
-Target RejectNegative Mask(NO_USE_FPU) MaskExists Undocumented
+Target RejectNegative Mask(NO_USE_FPU) Report Undocumented
fpu
Target RejectNegative InverseMask(NO_USE_FPU) Report
@c prevent bad page break with this line
You can control the compilation driver.
-@defmac TARGET_OPTION_TRANSLATE_TABLE
-If defined, a list of pairs of strings, the first of which is a
-potential command line target to the @file{gcc} driver program, and the
-second of which is a space-separated (tabs and other whitespace are not
-supported) list of options with which to replace the first option. The
-target defining this list is responsible for assuring that the results
-are valid. Replacement options may not be the @code{--opt} style, they
-must be the @code{-opt} style. It is the intention of this macro to
-provide a mechanism for substitution that affects the multilibs chosen,
-such as one option that enables many options, some of which select
-multilibs. Example nonsensical definition, where @option{-malt-abi},
-@option{-EB}, and @option{-mspoo} cause different multilibs to be chosen:
-
-@smallexample
-#define TARGET_OPTION_TRANSLATE_TABLE \
-@{ "-fast", "-march=fast-foo -malt-abi -I/usr/fast-foo" @}, \
-@{ "-compat", "-EB -malign=4 -mspoo" @}
-@end smallexample
-@end defmac
-
@defmac DRIVER_SELF_SPECS
A list of specs for the driver itself. It should be a suitable
initializer for an array of strings, with no surrounding braces.
@c prevent bad page break with this line
You can control the compilation driver.
-@defmac TARGET_OPTION_TRANSLATE_TABLE
-If defined, a list of pairs of strings, the first of which is a
-potential command line target to the @file{gcc} driver program, and the
-second of which is a space-separated (tabs and other whitespace are not
-supported) list of options with which to replace the first option. The
-target defining this list is responsible for assuring that the results
-are valid. Replacement options may not be the @code{--opt} style, they
-must be the @code{-opt} style. It is the intention of this macro to
-provide a mechanism for substitution that affects the multilibs chosen,
-such as one option that enables many options, some of which select
-multilibs. Example nonsensical definition, where @option{-malt-abi},
-@option{-EB}, and @option{-mspoo} cause different multilibs to be chosen:
-
-@smallexample
-#define TARGET_OPTION_TRANSLATE_TABLE \
-@{ "-fast", "-march=fast-foo -malt-abi -I/usr/fast-foo" @}, \
-@{ "-compat", "-EB -malign=4 -mspoo" @}
-@end smallexample
-@end defmac
-
@defmac DRIVER_SELF_SPECS
A list of specs for the driver itself. It should be a suitable
initializer for an array of strings, with no surrounding braces.
#include "opts.h"
#include "flags.h"
#include "diagnostic.h"
-#include "tm.h" /* For TARGET_OPTION_TRANSLATE_TABLE. */
static void prune_options (struct cl_decoded_option **, unsigned int *);
return result;
}
-#ifdef TARGET_OPTION_TRANSLATE_TABLE
-static const struct {
- const char *const option_found;
- const char *const replacements;
-} target_option_translations[] =
-{
- TARGET_OPTION_TRANSLATE_TABLE,
- { 0, 0 }
-};
-#endif
-
/* Decode command-line options (ARGC and ARGV being the arguments of
main) into an array, setting *DECODED_OPTIONS to a pointer to that
array and *DECODED_OPTIONS_COUNT to the number of entries in the
struct cl_decoded_option **decoded_options,
unsigned int *decoded_options_count)
{
- unsigned int n, i, target_translate_from;
+ unsigned int n, i;
struct cl_decoded_option *opt_array;
unsigned int num_decoded_options;
bool argv_copied = false;
opt_array[0].errors = 0;
num_decoded_options = 1;
- target_translate_from = 1;
for (i = 1; i < argc; i += n)
{
const char *opt = argv[i];
continue;
}
- if (i >= target_translate_from && (lang_mask & CL_DRIVER))
- {
-#ifdef TARGET_OPTION_TRANSLATE_TABLE
- int tott_idx;
-
- for (tott_idx = 0;
- target_option_translations[tott_idx].option_found;
- tott_idx++)
- {
- if (strcmp (target_option_translations[tott_idx].option_found,
- argv[i]) == 0)
- {
- unsigned int spaces = 0;
- unsigned int m = 0;
- const char *sp;
- char *np;
-
- for (sp = target_option_translations[tott_idx].replacements;
- *sp; sp++)
- {
- if (*sp == ' ')
- {
- spaces++;
- while (*sp == ' ')
- sp++;
- sp--;
- }
- }
-
- if (spaces)
- {
- int new_argc = argc + spaces;
- if (argv_copied)
- argv = XRESIZEVEC (const char *, argv, new_argc + 1);
- else
- {
- const char **new_argv = XNEWVEC (const char *,
- new_argc + 1);
- memcpy (new_argv, argv,
- (argc + 1) * sizeof (const char *));
- argv = new_argv;
- argv_copied = true;
- }
- memmove (&argv[i] + spaces, &argv[i],
- (argc + 1 - i) * sizeof (const char *));
- argc = new_argc;
- opt_array = XRESIZEVEC (struct cl_decoded_option,
- opt_array, argc);
- }
-
- sp = target_option_translations[tott_idx].replacements;
- np = xstrdup (sp);
-
- while (1)
- {
- while (*np == ' ')
- np++;
- if (*np == 0)
- break;
- argv[i + m++] = np;
- while (*np != ' ' && *np)
- np++;
- if (*np == 0)
- break;
- *np++ = 0;
- }
-
- target_translate_from = i + m;
- gcc_assert (m == spaces + 1);
- break;
- }
- }
-#endif
- }
-
n = decode_cmdline_option (argv + i, lang_mask,
&opt_array[num_decoded_options]);
num_decoded_options++;
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_TAKES_ARG WORD_SWITCH_TAKES_ARG
+ SWITCH_CURTAILS_COMPILATION SWITCH_TAKES_ARG WORD_SWITCH_TAKES_ARG \
+ TARGET_OPTION_TRANSLATE_TABLE
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \