This is the mail archive of the gdb-patches@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]

[patch] fix the triplet regexp to recognize triplets, not only quadruplets


This allows triplets where the vendor is not set. Should go to the trunk and the
7.9 branch.

Matthias

	* compile/compile.c (compile_to_object): Allow triplets.

--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -483,7 +483,7 @@ compile_to_object (struct command_line *

   os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch));
   arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
-  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.  */


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