This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC selftest improvements
- From: Pedro Alves <palves at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, Gabriel Dos Reis <gdr at microsoft dot com>, Andrew Dean <Andrew dot Dean at microsoft dot com>, David Malcolm <dmalcolm at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "ro at CeBiTec dot Uni-Bielefeld dot DE" <ro at cebitec dot uni-bielefeld dot de>, "mikestump at comcast dot net" <mikestump at comcast dot net>, "jason at redhat dot com" <jason at redhat dot com>, Jonathan Wakely <cxx at kayari dot org>
- Date: Thu, 31 Oct 2019 16:09:32 +0000
- Subject: Re: GCC selftest improvements
- References: <CO2PR00MB01197C9432A2E02C6F1692F1EA6A0@CO2PR00MB0119.namprd00.prod.outlook.com> <d16fabaf83d56495ce27f1ef5ca413247c29c24f.camel@redhat.com> <BN3PR00MB0116141705F4EA4B22045A19EA650@BN3PR00MB0116.namprd00.prod.outlook.com> <BL0PR2101MB10099E3DB7EB62603AFE4F21B0640@BL0PR2101MB1009.namprd21.prod.outlook.com> <acbd13b7-8869-3b52-1590-27ec4dc894cb@redhat.com> <20191028202713.GF28442@gate.crashing.org> <00dcb1c4-793c-c44f-da1b-eabe067c7e1e@redhat.com> <20191028214656.GB4650@tucnak> <CAFiYyc0P+67QEqgzhzQ6Fw+gGtSKZHY-kZ4qJYpKeF2xEL5HSA@mail.gmail.com>
On 10/29/19 8:40 AM, Richard Biener wrote:
> On Mon, Oct 28, 2019 at 10:47 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> As discussed earlier, we gain most through C++11 support, there is no need
>> to jump to C++17 or C++20 as requirement.
>
> Yes, I've agreed to raise the requirement to GCC 4.8 which provides
> C++11 support.
>
> For convenience we could also provide a configure-time hint if the host compiler
> doesn't have C++11 support or is older than 4.8.2 (I think .1 has some issues).
> Rather than only running into some obscure errors later on.
FWIW, GDB uses a slightly modified AX_CXX_COMPILE_STDCXX to check for C++11
support at configure time, and add -std=gnu++11 if the necessary, adding nothing
if the compiler supports C++11 or later OOTB (so that you can still access
C++14-or-later features&optimizations conditionally).
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/ax_cxx_compile_stdcxx.m4
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
https://sourceware.org/ml/gdb-patches/2016-10/msg00775.html
In practice, that returns "supports" for GCC 4.8 and above, which is
GDB's minimum requirement. I'm not sure about 4.8.x patch level.
Thanks,
Pedro Alves