aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2015-03-31 14:15:42 +0100
committerPedro Alves <palves@redhat.com>2015-03-31 14:15:42 +0100
commit71b30f27af091a16e6277e18ef574e0d2c0c55ef (patch)
tree08068cdb806f7c3f85d381f0476bfeef796903e9
parentf24173ebf754866d4a1881a28dc2c07062c119d7 (diff)
downloadgdb-71b30f27af091a16e6277e18ef574e0d2c0c55ef.zip
gdb-71b30f27af091a16e6277e18ef574e0d2c0c55ef.tar.gz
gdb-71b30f27af091a16e6277e18ef574e0d2c0c55ef.tar.bz2
Fix the triplet regexp to recognize triplets, not only quadruplets
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/compile/compile.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6c4bbe5..0dcb3a3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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-30 Doug Evans <dje@google.com>
PR c++/18141
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 1d342a0..90cfc36 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -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. */