Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/5] Remove a few hurdles of compiling with clang
Date: Tue, 13 Jun 2017 10:44:00 -0000	[thread overview]
Message-ID: <73cdd28f-8f6b-0367-f054-834477d16754@redhat.com> (raw)
In-Reply-To: <8660g0dzau.fsf@gmail.com>

On 06/13/2017 10:14 AM, Yao Qi wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
> 
>> That's precisely the reason why I raised this: it would be good to
>> have a clear policy on this, to avoid the need for unnecessary work
>> and unnecessary disputes.  (I actually hoped we already did have such
>> a policy, but if not, I think we should try to come up with it.)
> 
> In general, it is good to keep GDB built by different popular compilers,
> so people are easy to build GDB and different warnings from different
> compilers will catch more bugs in GDB.  On the other hand, GCC is still
> the primary compiler to build GDB, and support of other compilers in
> building GDB should not undermine the case that GDB is built by GCC.
> For example, it is not acceptable to build GDB with compiler X but break
> the build with GCC.  We still must fix the GDB build failure with GCC, as
> what we did in the past, and we welcome the contributions to fix the GDB
> build with other compilers.

I'm fine with that, as long as other compilers don't unreasonably hold
us back, when GCC is an option, and the user base that'd want to actually
use such a compiler is small.  E.g., maintenance effort, and migration
to newer language revisions.  Here I don't specifically mean Clang,
but in general.  E.g., exaggerating to illustrate a point, if someone wanted
to port GDB to OddballPlatform used by to handful of people in the world,
and that requires building with a 10-year-old compiler that nobody's
maintaining, then I think it'd be unreasonable for everyone upstream to have
to keep such a port in mind and consider whether such a port would get broken
by some GDB patch or design change.

Other popular compilers nowadays tend to support "GNU C/C++" and impersonate
as GCC (define __GNUC__, etc.), so porting effort tends to not be that big
in practice, fortunately.

The MSVC compiler issue came up in the -Wno-mismatched-tags discussion,
and I think my statements may have sounded too strongly against MSVC.
If someone wants to make GDB buildable with Visual Studio for some reason,
I'd personally be OK with that, as long as that doesn't involve uglifying
the codebase, or holding back migration to newer language revisions.
Modern versions are getting better at standards compliance and gnulib
supports MSVC (ISTR there's some command line compiler wrapper that makes
it possible to run configury with msvc), so it may actually be doable.
I don't know why would someone want to do it, though.  But until someone
seriously steps forward and commits to maintaining such a port, caring
about "-Wmismatched-tags" warnings is useless, since I suspect that
issue would be the least of the porting effort troubles.

BTW, on the different warnings, IMO, ideally every bug that Clang finds in
the code that GCC didn't warn about should be considered a GCC bug,
and we should make sure that it's reported on the GCC tracker.

Thanks,
Pedro Alves


  parent reply	other threads:[~2017-06-13 10:44 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10 19:58 Simon Marchi
2017-06-10 19:58 ` [PATCH 4/5] linux-low: Remove usage of "register" keyword Simon Marchi
2017-06-10 19:58 ` [PATCH 5/5] Add ATTRIBUTE_PRINTF to trace_start_error Simon Marchi
2017-06-14 19:49   ` Sergio Durigan Junior
2017-06-10 19:58 ` [PATCH 3/5] gdb: Add -Wno-mismatched-tags Simon Marchi
2017-06-10 19:58 ` [PATCH 1/5] gdb: Pass -x c++ to the compiler Simon Marchi
2017-06-10 19:58 ` [PATCH 2/5] gdb: Use -Werror when checking for (un)supported warning flags Simon Marchi
2017-06-11  2:36 ` [PATCH 0/5] Remove a few hurdles of compiling with clang Eli Zaretskii
2017-06-12  7:56   ` Yao Qi
2017-06-12 14:36     ` Eli Zaretskii
2017-06-12 15:54       ` Simon Marchi
2017-06-12 16:23         ` Andrew Pinski
2017-06-12 16:35           ` Pedro Alves
2017-06-12 16:37             ` Andrew Pinski
2017-06-12 16:45               ` Pedro Alves
2017-06-12 16:55                 ` Pedro Alves
2017-06-12 16:44           ` Simon Marchi
2017-06-12 16:55             ` Andrew Pinski
2017-06-12 17:00               ` Simon Marchi
2017-06-12 16:44         ` Eli Zaretskii
2017-06-13  9:14           ` Yao Qi
2017-06-13 10:23             ` Simon Marchi
2017-06-13 11:06               ` Pedro Alves
2017-06-13 11:08                 ` Simon Marchi
2017-06-13 14:38               ` Eli Zaretskii
2017-06-13 17:07                 ` Simon Marchi
2017-06-13 19:23                   ` Eli Zaretskii
2017-06-13 20:17                     ` Simon Marchi
2017-06-14  2:29                       ` Eli Zaretskii
2017-06-14 10:45                         ` Pedro Alves
2017-06-16 16:12                           ` John Baldwin
2017-06-13 15:22               ` Yao Qi
2017-06-13 15:44                 ` Eli Zaretskii
2017-06-14  9:07                   ` Yao Qi
2017-06-19  8:07                 ` Yao Qi
2017-06-13 10:44             ` Pedro Alves [this message]
2017-06-13 15:09               ` Joel Brobecker
2017-06-17 21:23 ` Simon Marchi

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=73cdd28f-8f6b-0367-f054-834477d16754@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    --cc=simon.marchi@polymtl.ca \
    /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