From: Matthias Klose Date: Tue, 31 Mar 2015 13:15:42 +0000 (+0100) Subject: Fix the triplet regexp to recognize triplets, not only quadruplets X-Git-Tag: users/hjl/linux/release/2.25.51.0.2~2^2~19^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71b30f27af091a16e6277e18ef574e0d2c0c55ef;p=thirdparty%2Fbinutils-gdb.git 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 * compile/compile.c (compile_to_object): Allow triplets with or without vendor set. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c4bbe5eb0e..0dcb3a3d7f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-03-31 Matthias Klose + + * compile/compile.c (compile_to_object): Allow triplets with or + without vendor set. + 2015-03-30 Doug Evans PR c++/18141 diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 1d342a0d82c..90cfc36ae1c 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. */