gdb/gdbsupport/gdbserver: Require c++17
authorLancelot Six <lancelot.six@amd.com>
Tue, 12 Sep 2023 12:34:51 +0000 (12:34 +0000)
committerLancelot Six <lancelot.six@amd.com>
Sat, 28 Oct 2023 19:25:34 +0000 (19:25 +0000)
commitf74dc26792a0679e29db45e56367331ff48666d1
treec70261e72422a288b139750893933098e5ad0c24
parenteb4de4047d8fab210c521730a2e4b43401129981
gdb/gdbsupport/gdbserver: Require c++17

This patch proposes to require a C++17 compiler to build gdb /
gdbsupport / gdbserver.  Before this patch, GDB required a C++11
compiler.

The general policy regarding bumping C++ language requirement in GDB (as
stated in [1]) is:

    Our general policy is to wait until the oldest compiler that
    supports C++NN is at least 3 years old.

    Rationale: We want to ensure reasonably widespread compiler
    availability, to lower barrier of entry to GDB contributions, and to
    make it easy for users to easily build new GDB on currently
    supported stable distributions themselves. 3 years should be
    sufficient for latest stable releases of distributions to include a
    compiler for the standard, and/or for new compilers to appear as
    easily installable optional packages. Requiring everyone to build a
    compiler first before building GDB, which would happen if we
    required a too-new compiler, would cause too much inconvenience.

    See the policy proposal and discussion
    [here](https://sourceware.org/ml/gdb-patches/2016-10/msg00616.html).

The first GCC release which with full C++17 support is GCC-9[2],
released in 2019[3], which is over 4 years ago.  Clang has had C++17
support since Clang-5[4] released in 2018[5].

A discussions with many distros showed that a C++17-able compiler is
always available, meaning that this no hard requirement preventing us to
require it going forward.

[1] https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#When_is_GDB_going_to_start_requiring_C.2B-.2B-NN_.3F
[2] https://gcc.gnu.org/projects/cxx-status.html#cxx17
[3] https://gcc.gnu.org/gcc-9/
[4] https://clang.llvm.org/cxx_status.html
[5] https://releases.llvm.org/

Change-Id: Id596f5db17ea346e8a978668825787b3a9a443fd
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
Approved-By: Pedro Alves <pedro@palves.net>
12 files changed:
gdb/NEWS
gdb/README
gdb/config.in
gdb/configure
gdb/configure.ac
gdbserver/config.in
gdbserver/configure
gdbserver/configure.ac
gdbsupport/Makefile.in
gdbsupport/config.in
gdbsupport/configure
gdbsupport/configure.ac