This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets
- From: Pedro Alves <palves at redhat dot com>
- To: Matthias Klose <doko at ubuntu dot com>, gdb-patches at sourceware dot org
- Date: Thu, 26 Mar 2015 10:03:44 +0000
- Subject: Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets
- Authentication-results: sourceware.org; auth=none
- References: <551006B4 dot 2040404 at ubuntu dot com>
On 03/23/2015 12:27 PM, Matthias Klose wrote:
> 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);
Add comment like:
/* Allow triplets with or without vendor set. */
OK with that change.
> make_cleanup (xfree, triplet_rx);
>
> /* Set compiler command-line arguments. */
Thanks,
Pedro Alves