#include "params.h"
#include "diagnostic.h"
#include "opts-diagnostic.h"
-#include "tm_p.h" /* For OPTIMIZATION_OPTIONS. */
#include "insn-attr.h" /* For INSN_SCHEDULING. */
#include "target.h"
#include "tree-pass.h"
set after target options have been processed. */
flag_short_enums = 2;
- /* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can
- modify it. */
+ /* Initialize target_flags before
+ targetm.target_option.optimization so the latter can modify
+ it. */
target_flags = targetm.default_target_flags;
/* Some targets have ABI-specified unwind tables. */
lto_clear_user_options ();
#endif
-#ifdef OPTIMIZATION_OPTIONS
/* Allow default optimizations to be specified on a per-machine basis. */
- OPTIMIZATION_OPTIONS (optimize, optimize_size);
-#endif
+ targetm.target_option.optimization (optimize, optimize_size);
read_cmdline_options (*decoded_options, *decoded_options_count, lang_mask,
&handlers);
check option consistency. */
if (flag_lto && flag_whopr)
error ("-flto and -fwhopr are mutually exclusive");
+
+ /* We initialize flag_split_stack to -1 so that targets can set a
+ default value if they choose based on other options. */
+ if (flag_split_stack == -1)
+ flag_split_stack = 0;
+ else
+ {
+ if (!targetm.supports_split_stack (true))
+ {
+ error ("%<-fsplit-stack%> is not supported by "
+ "this compiler configuration");
+ flag_split_stack = 0;
+ }
+ }
}
#define LEFT_COLUMN 27
verbose = true;
break;
- case OPT_fhelp:
case OPT__help:
{
unsigned int all_langs_mask = (1U << cl_lang_count) - 1;
break;
}
- case OPT_ftarget_help:
case OPT__target_help:
print_specific_help (CL_TARGET, CL_UNDOCUMENTED, 0);
exit_after_options = true;
targetm.help ();
break;
- case OPT_fhelp_:
case OPT__help_:
{
const char * a = arg;
break;
}
- case OPT_fversion:
case OPT__version:
exit_after_options = true;
break;