Commit 169d8507 by H.J. Lu Committed by H.J. Lu

Handle OPT_SPECIAL_XXX in LTO

	PR lto/54795
	* lto-opts.c (lto_write_options): Also handle
	OPT_SPECIAL_unknown, OPT_SPECIAL_ignore and
	OPT_SPECIAL_program_name.

	PR lto/55474
	* lto-wrapper.c (merge_and_complain): Handle
	OPT_SPECIAL_unknown, OPT_SPECIAL_ignore,
	OPT_SPECIAL_program_name and OPT_SPECIAL_input_file.

Co-Authored-By: Markus Trippelsdorf <markus@trippelsdorf.de>

From-SVN: r193848
parent 5a860835
2012-11-27 H.J. Lu <hongjiu.lu@intel.com>
Markus Trippelsdorf <markus@trippelsdorf.de>
PR lto/54795
* lto-opts.c (lto_write_options): Also handle
OPT_SPECIAL_unknown, OPT_SPECIAL_ignore and
OPT_SPECIAL_program_name.
PR lto/55474
* lto-wrapper.c (merge_and_complain): Handle
OPT_SPECIAL_unknown, OPT_SPECIAL_ignore,
OPT_SPECIAL_program_name and OPT_SPECIAL_input_file.
2012-11-27 Jakub Jelinek <jakub@redhat.com> 2012-11-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/52650 PR middle-end/52650
...@@ -93,6 +93,20 @@ lto_write_options (void) ...@@ -93,6 +93,20 @@ lto_write_options (void)
{ {
struct cl_decoded_option *option = &save_decoded_options[i]; struct cl_decoded_option *option = &save_decoded_options[i];
/* Skip explicitly some common options that we do not need. */
switch (option->opt_index)
{
case OPT_dumpbase:
case OPT_SPECIAL_unknown:
case OPT_SPECIAL_ignore:
case OPT_SPECIAL_program_name:
case OPT_SPECIAL_input_file:
continue;
default:
break;
}
/* Skip frontend and driver specific options here. */ /* Skip frontend and driver specific options here. */
if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO))) if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO)))
continue; continue;
...@@ -108,17 +122,6 @@ lto_write_options (void) ...@@ -108,17 +122,6 @@ lto_write_options (void)
if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING)) if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING))
continue; continue;
/* Skip explicitly some common options that we do not need. */
switch (option->opt_index)
{
case OPT_dumpbase:
case OPT_SPECIAL_input_file:
continue;
default:
break;
}
for (j = 0; j < option->canonical_option_num_elements; ++j) for (j = 0; j < option->canonical_option_num_elements; ++j)
append_to_collect_gcc_options (&temporary_obstack, &first_p, append_to_collect_gcc_options (&temporary_obstack, &first_p,
option->canonical_option[j]); option->canonical_option[j]);
......
...@@ -393,6 +393,12 @@ merge_and_complain (struct cl_decoded_option **decoded_options, ...@@ -393,6 +393,12 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
struct cl_decoded_option *foption = &fdecoded_options[i]; struct cl_decoded_option *foption = &fdecoded_options[i];
switch (foption->opt_index) switch (foption->opt_index)
{ {
case OPT_SPECIAL_unknown:
case OPT_SPECIAL_ignore:
case OPT_SPECIAL_program_name:
case OPT_SPECIAL_input_file:
break;
default: default:
if (!(cl_options[foption->opt_index].flags & CL_TARGET)) if (!(cl_options[foption->opt_index].flags & CL_TARGET))
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment