* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
testsuite/
	* gcc.dg/debug/dwarf2/prod-options.c: New test.
From-SVN: r231835
+2015-12-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
+
+       * dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
+
 2015-12-18  Nathan Sidwell  <nathan@acm.org>
 
        * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry for
 
       case OPT_fpreprocessed:
       case OPT_fltrans_output_list_:
       case OPT_fresolution_:
+      case OPT_fdebug_prefix_map_:
        /* Ignore these.  */
        continue;
       default:
 
+2015-12-18  Bernd Schmidt  <bschmidt@redhat.com>
+
+       * gcc.dg/debug/dwarf2/prod-options.c: New test.
+
 2015-12-18  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/specs/debug1.ads: Bump final count to 18.
 
--- /dev/null
+/* Verify that the DW_AT_producer does not contain certain compiler options
+   such as -fdebug-prefix-map=; this is undesirable since path names make
+   the build not reproducible.  Other skipped options could be tested here
+   as well.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -gdwarf -dA -fdebug-prefix-map=a=b" } */
+/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" } } */
+/* { dg-final { scan-assembler-not "debug-prefix-map" } } */
+
+void func (void)
+{
+}