From 169d8507caebe73a977bcdb9f16cbb6254e7efd8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 27 Nov 2012 13:56:31 +0000 Subject: [PATCH] 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 From-SVN: r193848 --- gcc/ChangeLog | 13 +++++++++++++ gcc/lto-opts.c | 25 ++++++++++++++----------- gcc/lto-wrapper.c | 6 ++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a18b153d01..1202386d5d8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2012-11-27 H.J. Lu + Markus Trippelsdorf + + 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 PR middle-end/52650 diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index a235f41da8d..a61a26ff56f 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -93,6 +93,20 @@ lto_write_options (void) { 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. */ if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO))) continue; @@ -108,17 +122,6 @@ lto_write_options (void) if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING)) 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) append_to_collect_gcc_options (&temporary_obstack, &first_p, option->canonical_option[j]); diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 1f4d2128d94..24de743306a 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -393,6 +393,12 @@ merge_and_complain (struct cl_decoded_option **decoded_options, struct cl_decoded_option *foption = &fdecoded_options[i]; switch (foption->opt_index) { + case OPT_SPECIAL_unknown: + case OPT_SPECIAL_ignore: + case OPT_SPECIAL_program_name: + case OPT_SPECIAL_input_file: + break; + default: if (!(cl_options[foption->opt_index].flags & CL_TARGET)) break;