Re: [PATCH 0/5] Remove a few hurdles of compiling with clang

Eli Zaretskii
2017-06-12T14:36:06Z

> From: Yao Qi <qiyaoltc@gmail.com>
> Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
> Date: Mon, 12 Jun 2017 08:56:51 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Question to Joel and Pedro: Do we really want to go to these length to
> > accommodate clang? What's our policy?
>
> I'd like to see GDB can be built by clang. What is more, I'd like to
> get rid of any unnecessary GNU-specific or GCC assumptions from GDB
> tests. It is a good thing to build and test GDB with different compilers.

That's not the issue: AFAIU, GDB already builds with clang.

The issue is how much effort would we want to invest for that, and
what are we willing to give up when using GCC to be able to use other
compilers. For example, the proposed patch adds an explicit "-x c++"
switch to _all_ compilations, and also tweaks the warning switches.
I'm not sure we want GCC builds to be affected so that clang builds
could be cleaner. But maybe we have a policy about this which deems
these issues acceptable?