* [patch] fix the triplet regexp to recognize triplets, not only quadruplets
@ 2015-03-23 12:27 Matthias Klose
2015-03-26 10:03 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2015-03-23 12:27 UTC (permalink / raw)
To: gdb-patches
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. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets
2015-03-23 12:27 [patch] fix the triplet regexp to recognize triplets, not only quadruplets Matthias Klose
@ 2015-03-26 10:03 ` Pedro Alves
2015-03-27 15:15 ` Matthias Klose
0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2015-03-26 10:03 UTC (permalink / raw)
To: Matthias Klose, gdb-patches
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets
2015-03-26 10:03 ` Pedro Alves
@ 2015-03-27 15:15 ` Matthias Klose
2015-03-31 13:27 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2015-03-27 15:15 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 03/26/2015 11:03 AM, Pedro Alves wrote:
> 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.
updated patch attached. Please could somebody commit the patch?
Matthias
* compile/compile.c (compile_to_object): Allow triplets with or without vendor set.
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -483,7 +483,9 @@ 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);
+
+ /* 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. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] fix the triplet regexp to recognize triplets, not only quadruplets
2015-03-27 15:15 ` Matthias Klose
@ 2015-03-31 13:27 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2015-03-31 13:27 UTC (permalink / raw)
To: Matthias Klose, gdb-patches
On 03/27/2015 03:15 PM, Matthias Klose wrote:
> On 03/26/2015 11:03 AM, Pedro Alves wrote:
>> 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.
>
> updated patch attached. Please could somebody commit the patch?
Pushed.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-31 13:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 12:27 [patch] fix the triplet regexp to recognize triplets, not only quadruplets Matthias Klose
2015-03-26 10:03 ` Pedro Alves
2015-03-27 15:15 ` Matthias Klose
2015-03-31 13:27 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).