]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix the triplet regexp to recognize triplets, not only quadruplets
authorMatthias Klose <doko@ubuntu.com>
Tue, 31 Mar 2015 13:22:18 +0000 (14:22 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 31 Mar 2015 13:22:18 +0000 (14:22 +0100)
This allows triplets where the vendor is not set.

gdb/ChangeLog:
2015-03-31  Matthias Klose  <doko@ubuntu.com>

* compile/compile.c (compile_to_object): Allow triplets with or
without vendor set.

gdb/ChangeLog
gdb/compile/compile.c

index 8f95a2add9e18f2bcea054c02c0ae8678a90951d..1752c8dfcb763b7461c1340c76c2fa4e92451acb 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-31  Matthias Klose  <doko@ubuntu.com>
+
+       * compile/compile.c (compile_to_object): Allow triplets with or
+       without vendor set.
+
 2015-03-21  Eli Zaretskii  <eliz@gnu.org>
 
        * tui/tui-io.c (tui_expand_tabs): Reinitialize the column counter
index c204a135ef2a8f865b8028e8d6fa2511d1d4f217..1806b90f66223c0aea7fffffe4aa637b8acd9247 100644 (file)
@@ -483,7 +483,9 @@ compile_to_object (struct command_line *cmd, char *cmd_string,
 
   os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch));
   arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
-  triplet_rx = concat (arch_rx, "-[^-]*-", os_rx, (char *) NULL);
+
+  /* Allow triplets with or without vendor set.  */
+  triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL);
   make_cleanup (xfree, triplet_rx);
 
   /* Set compiler command-line arguments.  */