This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-7.9-branch] Fix the triplet regexp to recognize triplets, not only quadruplets


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2e9f68f0cf32bad824100dfb5d05c4235cf59ff3

commit 2e9f68f0cf32bad824100dfb5d05c4235cf59ff3
Author: Matthias Klose <doko@ubuntu.com>
Date:   Tue Mar 31 14:22:18 2015 +0100

    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.

Diff:
---
 gdb/ChangeLog         | 5 +++++
 gdb/compile/compile.c | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8f95a2a..1752c8d 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-21  Eli Zaretskii  <eliz@gnu.org>
 
 	* tui/tui-io.c (tui_expand_tabs): Reinitialize the column counter
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index c204a13..1806b90 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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]