Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@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:19:00 -0000	[thread overview]
Message-ID: <871so2h16k.fsf@redhat.com> (raw)
In-Reply-To: <b7d61519-bf82-3308-b132-8839e19f2feb@redhat.com> (Pedro Alves's	message of "Wed, 23 Aug 2017 14:14:52 +0100")

On Wednesday, August 23 2017, Pedro Alves wrote:

> 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

OK, thanks, I'll follow the advices from the wiki.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


  reply	other threads:[~2017-08-23 13:19 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
2017-08-23 13:19       ` Sergio Durigan Junior [this message]
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=871so2h16k.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=aoliva@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=palves@redhat.com \
    --cc=pmuldoon@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