From 3fe1aabeaa4fe1196886cfa68bdaa0ec581df965 Mon Sep 17 00:00:00 2001 From: simonb Date: Fri, 24 Aug 2012 14:58:06 +0000 Subject: [PATCH] gcc/ChangeLog * dwarf2out.c (gen_producer_string): Omit command line switch if CL_NO_DWARF_RECORD flag set. * opts.h (CL_NO_DWARF_RECORD): New. * opt-functions.awk (switch_flags): Add NoDWARFRecord. * doc/options.texi: Document NoDWARFRecord option flag. gcc/fortran/ChangeLog * lang.opt (-cpp=): Mark flag NoDWARFRecord. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190648 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/doc/options.texi | 4 ++++ gcc/dwarf2out.c | 3 +++ gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/lang.opt | 2 +- gcc/opt-functions.awk | 1 + gcc/opts.h | 1 + 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65cb9939d9be..9569688ba108 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-08-24 Simon Baldwin + + * dwarf2out.c (gen_producer_string): Omit command line switch if + CL_NO_DWARF_RECORD flag set. + * opts.h (CL_NO_DWARF_RECORD): New. + * opt-functions.awk (switch_flags): Add NoDWARFRecord. + * doc/options.texi: Document NoDWARFRecord option flag. + 2012-08-24 H.J. Lu PR debug/52857 diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi index ef720307eee6..9c004c8cd3f8 100644 --- a/gcc/doc/options.texi +++ b/gcc/doc/options.texi @@ -468,4 +468,8 @@ of @option{-@var{opt}}, if not explicitly set. It is possible to specify several different languages. Each @var{language} must have been declared by an earlier @code{Language} record. @xref{Option file format}. + +@item NoDWARFRecord +The option is omitted from the producer string written by +@option{-grecord-gcc-switches}. @end table diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4c268d48eeaa..a87eaf2bd7dd 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18142,6 +18142,9 @@ gen_producer_string (void) /* Ignore these. */ continue; default: + if (cl_options[save_decoded_options[j].opt_index].flags + & CL_NO_DWARF_RECORD) + continue; gcc_checking_assert (save_decoded_options[j].canonical_option[0][0] == '-'); switch (save_decoded_options[j].canonical_option[0][1]) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e8b4b4168bd9..f67e501f4200 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2012-08-24 Simon Baldwin + + * lang.opt (-cpp=): Mark flag NoDWARFRecord. + 2012-08-23 Tobias Burnus PR fortran/54350 diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index b38b1e8bea19..8a633464c4c6 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -295,7 +295,7 @@ Fortran Negative(nocpp) Enable preprocessing cpp= -Fortran Joined Negative(nocpp) Undocumented +Fortran Joined Negative(nocpp) Undocumented NoDWARFRecord ; Internal option generated by specs from -cpp. nocpp diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk index 8e098c28c2cc..8b025b2cf32f 100644 --- a/gcc/opt-functions.awk +++ b/gcc/opt-functions.awk @@ -103,6 +103,7 @@ function switch_flags (flags) test_flag("JoinedOrMissing", flags, " | CL_JOINED") \ test_flag("Separate", flags, " | CL_SEPARATE") \ test_flag("Undocumented", flags, " | CL_UNDOCUMENTED") \ + test_flag("NoDWARFRecord", flags, " | CL_NO_DWARF_RECORD") \ test_flag("Warning", flags, " | CL_WARNING") \ test_flag("Optimization", flags, " | CL_OPTIMIZATION") sub( "^0 \\| ", "", result ) diff --git a/gcc/opts.h b/gcc/opts.h index dbefc6401d92..a9336af74bcb 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -145,6 +145,7 @@ extern const unsigned int cl_lang_count; #define CL_JOINED (1U << 22) /* If takes joined argument. */ #define CL_SEPARATE (1U << 23) /* If takes a separate argument. */ #define CL_UNDOCUMENTED (1U << 24) /* Do not output with --help. */ +#define CL_NO_DWARF_RECORD (1U << 25) /* Do not add to producer string. */ /* Flags for an enumerated option argument. */ #define CL_ENUM_CANONICAL (1 << 0) /* Canonical for this value. */ -- 2.11.4.GIT