[2/2] Add trailing dash on triplet regexp
Commit Message
This is the GDB patch.
It is very simple, and just a necessary adjustment needed because of the
modifications made in the "make_regexp" functions on libcc1.
Now, GDB will provide a full regexp for triplet names, including the
trailing dash ("-"). Therefore, we will have a regexp that truly
matches the full triplet (e.g., "^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-")
instead of one that leaves the trailing "-" match to libcc1.
OK to apply?
@@ -509,7 +509,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
/* Allow triplets with or without vendor set. */
- triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL);
+ triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, "-", (char *) NULL);
make_cleanup (xfree, triplet_rx);
/* Set compiler command-line arguments. */