Use -flto instead of -flto=N in DWARF producer string.
authorMartin Liska <mliska@suse.cz>
Tue, 23 Jul 2019 07:31:50 +0000 (09:31 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 23 Jul 2019 07:31:50 +0000 (07:31 +0000)
2019-07-23  Martin Liska  <mliska@suse.cz>

* dwarf2out.c (gen_producer_string): Canonize -flto=N
to -flto in dwarf producer string.

From-SVN: r273717

gcc/ChangeLog
gcc/dwarf2out.c

index ad612c2e4fe65cdea9eaa067176d6be39ac81784..3e8953fc09757678107a72524255e83ebffdca1b 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-23  Martin Liska  <mliska@suse.cz>
+
+       * dwarf2out.c (gen_producer_string): Canonize -flto=N
+       to -flto in dwarf producer string.
+
 2019-07-23  Richard Biener  <rguenther@suse.de>
 
        * tree-cfg.c (label_for_bb): Remove global var.
index 0449c2b2912685339eb4cd95320a4ea2ff14d0b5..aa7fd7eb46580ada6949ce96570cff9c67735c33 100644 (file)
@@ -24460,6 +24460,13 @@ gen_producer_string (void)
       case OPT_fchecking_:
        /* Ignore these.  */
        continue;
+      case OPT_flto_:
+       {
+         const char *lto_canonical = "-flto";
+         switches.safe_push (lto_canonical);
+         len += strlen (lto_canonical) + 1;
+         break;
+       }
       default:
         if (cl_options[save_decoded_options[j].opt_index].flags
            & CL_NO_DWARF_RECORD)