This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] DW_AT_producer: Ignore -fpreprocessed
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 17 Jan 2015 00:42:21 +0100
- Subject: [patch] DW_AT_producer: Ignore -fpreprocessed
- Authentication-results: sourceware.org; auth=none
Hi,
I have provided a sufficient fix in GDB for the -fplugin=libcc1plugin feature:
[patch+7.9] compile: Filter out -fpreprocessed
https://sourceware.org/ml/gdb-patches/2015-01/msg00485.html
But still I think "-fpreprocessed" is inappropriate for DW_AT_producer.
Otherwise for an inferior built using ccache the string "-fpreprocessed" is
put into DW_AT_producer and then GDB compilation with -fplugin=libcc1plugin
breaks as the GDB-runtime-generated source is not already preprocessed.
I have rebuilt GCC but I have not run the testsuite with this patch.
Jan
gcc/ChangeLog
* dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.
Index: ./gcc/dwarf2out.c
===================================================================
--- ./gcc/dwarf2out.c (revision 219770)
+++ ./gcc/dwarf2out.c (working copy)
@@ -19624,6 +19624,7 @@ gen_producer_string (void)
case OPT__sysroot_:
case OPT_nostdinc:
case OPT_nostdinc__:
+ case OPT_fpreprocessed:
/* Ignore these. */
continue;
default: