Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Tom Tromey <tom@tromey.com>, Keith Seitz <keiths@redhat.com>,
	Phil Muldoon <pmuldoon@redhat.com>,
	Alexandre Oliva <aoliva@redhat.com>
Subject: [PATCH 2/2] [GDB] Add trailing dash on triplet regexp
Date: Wed, 23 Aug 2017 04:18:00 -0000	[thread overview]
Message-ID: <87k21uhq7i.fsf@redhat.com> (raw)
In-Reply-To: <87mv6qhq9u.fsf@redhat.com>

This is the GDB patch.

It is very simple, and just a necessary adjustment needed because of the
modifications made in the "make_regexp" functions on libcc1.

Now, GDB will provide a full regexp for triplet names, including the
trailing dash ("-").  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.

OK to apply?

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

gdb/ChangeLog:
2017-08-23  Sergio Durigan Junior  <sergiodj@redhat.com>

	* compile/compile.c (compile_to_object): Add trailing dash on
	triplet regexp.

diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 91e084f89f..0ce77a8b95 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -509,7 +509,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
   arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
 
   /* Allow triplets with or without vendor set.  */
-  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.  */


  parent reply	other threads:[~2017-08-23  4:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  4:17 [libcc1] Improve detection of triplet on compiler names 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 ` Sergio Durigan Junior [this message]
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
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=87k21uhq7i.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=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