From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Tom Tromey <tom@tromey.com>, Keith Seitz <keiths@redhat.com>,
Phil Muldoon <pmuldoon@redhat.com>,
Alexandre Oliva <aoliva@redhat.com>
Subject: Re: [libcc1] Improve detection of triplet on compiler names
Date: Wed, 23 Aug 2017 13:15:00 -0000 [thread overview]
Message-ID: <b7d61519-bf82-3308-b132-8839e19f2feb@redhat.com> (raw)
In-Reply-To: <87a82qh1pn.fsf@redhat.com>
On 08/23/2017 02:07 PM, Sergio Durigan Junior wrote:
> On Wednesday, August 23 2017, Pedro Alves wrote:
>
>> On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote:
>>> The GCC patch improves the libcc1::compiler_triplet_regexp::find and
>>> libcp1::compiler_triplet_regexp::find methods by first trying to match
>>> the triplet in the compiler name and correctly discarding the triplet
>>> part of the regexp if the matching succeeds. I've had to do a few
>>> modifications on the way the regexp's are built, but I'll explain them
>>> in the patch itself.
>>>
>>> The GDB patch is very simple: it adds the trailing "-" in the triplet
>>> regexp. Therefore, we will have a regexp that truly matches the full
>>> triplet (e.g., "^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-") instead of one
>>> that leaves the trailing "-" match to libcc1.
>>>
>>> I've tested this patch both on my Fedora and my Debian machines, and
>>> both now work as expected, independently of the presence of the triplet
>>> string in the compiler name. I am sorry about the cross-post, but these
>>> patches are really dependent on one another.
>>
>> Is there a backward/forward compatibility impact?
>
> Unfortunately, yes.
>
>> Does new GDB work with old GCC?
>
> No. On Fedora systems, you would get:
>
> Could not find a compiler matching "^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?--gcc$"
>
That's a problem then. Please read this:
https://sourceware.org/gdb/wiki/GCCCompileAndExecute#How_to_extend_the_gdb.2BAC8-gcc_interface
> As can be seen, these failures are now happening because of the trailing
> dash that is now included in the triplet regexp by GDB. I don't know if
> that warrants a change in the API, though.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-08-23 13:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 4:17 Sergio Durigan Junior
2017-08-23 4:18 ` [PATCH 1/2] [GCC] Improve regexp handling on libc[cp]1::compiler_triplet_regexp::find Sergio Durigan Junior
2017-08-23 4:18 ` [PATCH 2/2] [GDB] Add trailing dash on triplet regexp Sergio Durigan Junior
2017-08-23 9:20 ` [libcc1] Improve detection of triplet on compiler names Pedro Alves
[not found] ` <87a82qh1pn.fsf@redhat.com>
2017-08-23 13:15 ` Pedro Alves [this message]
2017-08-23 13:19 ` Sergio Durigan Junior
2017-08-23 18:18 ` Pedro Alves
2017-08-23 18:28 ` Sergio Durigan Junior
2017-09-01 18:33 ` [PATCH v2] [libcc1] Rename C{,P}_COMPILER_NAME and remove triplet from them Sergio Durigan Junior
2017-09-15 4:12 ` Sergio Durigan Junior
2017-09-26 16:53 ` Sergio Durigan Junior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7d61519-bf82-3308-b132-8839e19f2feb@redhat.com \
--to=palves@redhat.com \
--cc=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=pmuldoon@redhat.com \
--cc=sergiodj@redhat.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox