aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/compile/compile.c')
-rw-r--r--gdb/compile/compile.c4
1 files changed, 3 insertions, 1 deletions
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. */