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 18:28:00 -0000 [thread overview]
Message-ID: <87ziaqw33i.fsf@redhat.com> (raw)
In-Reply-To: <af151878-0195-dd4b-06ea-9c1c05b6903e@redhat.com> (Pedro Alves's message of "Wed, 23 Aug 2017 19:18:29 +0100")
On Wednesday, August 23 2017, Pedro Alves wrote:
> On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote:
>> Hi there,
>>
>> This is a series of two patches, one for GDB and one for GCC, which aims
>> to improve the detection and handling of triplets present on compiler
>> names. The motivation for this series was mostly the fact that GDB's
>> "compile" command is broken on Debian unstable, as can be seen here:
>>
>> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851146>
>>
>> The reason for the failure is the fact that Debian compiles GCC using
>> the --program-{prefix,suffix} options from configure in order to name
>> the compiler using the full triplet (i.e., Debian's GCC is not merely
>> named "gcc", but e.g. "x86_64-linux-gnu-gcc-7"), which end up naming the
>> C_COMPILER_NAME and CP_COMPILER_NAME defines with the specified prefix
>> and suffix. Therefore, the regexp being used to match the compiler name
>> is wrong because it doesn't take into account the fact that the defines
>> may already contain the triplets.
>
> As discussed on IRC, I think the problem is that C_COMPILER_NAME
> in libcc1 includes the full triplet in the first place. I think
> that it shouldn't. I think that C_COMPILER_NAME should always
> be "gcc".
Thanks for summarizing the discussion.
I tend to agree with the rationale, and having C_COMPILER_NAME as "gcc"
is also a valid fix for the original problem.
As I said, I'd also like to hear others' opinions about the issue. I
can then submit a proper patch.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
next prev parent reply other threads:[~2017-08-23 18:28 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
2017-08-23 18:18 ` Pedro Alves
2017-08-23 18:28 ` Sergio Durigan Junior [this message]
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=87ziaqw33i.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