Browse Source

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>
binutils-2_42-branch
Lancelot Six 3 years ago
parent
commit
f74dc26792
  1. 3
      gdb/NEWS
  2. 4
      gdb/README
  3. 4
      gdb/config.in
  4. 1970
      gdb/configure
  5. 4
      gdb/configure.ac
  6. 4
      gdbserver/config.in
  7. 1970
      gdbserver/configure
  8. 4
      gdbserver/configure.ac
  9. 2
      gdbsupport/Makefile.in
  10. 4
      gdbsupport/config.in
  11. 1970
      gdbsupport/configure
  12. 4
      gdbsupport/configure.ac

3
gdb/NEWS

@ -3,6 +3,9 @@
*** Changes since GDB 14
* Building GDB and GDBserver now requires a C++17 compiler.
For example, GCC 9 or later.
* GDB index now contains information about the main function. This speeds up
startup when it is being used for some large binaries.

4
gdb/README

@ -82,8 +82,8 @@ list of options, invoke the subdirectory `configure', like:
(Take note of how this differs from the invocation used to actually
configure the build tree.)
GDB requires a C++11 compiler. If you do not have a
C++11 compiler for your system, you may be able to download and install
GDB requires a C++17 compiler. If you do not have a
C++17 compiler for your system, you may be able to download and install
the GNU CC compiler. It is available via anonymous FTP from the
directory `ftp://ftp.gnu.org/pub/gnu/gcc'. GDB also requires an ISO
C standard library. The GDB remote server, GDBserver, builds with some

4
gdb/config.in

@ -99,8 +99,8 @@
/* Define to 1 if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
/* define if the compiler supports basic C++17 syntax */
#undef HAVE_CXX17
/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
you don't. */

1970
gdb/configure

File diff suppressed because it is too large

4
gdb/configure.ac

@ -53,9 +53,9 @@ LT_INIT
# link tests in the configure script.
LT_OUTPUT
# We require a C++11 compiler. Check if one is available, and if
# We require a C++17 compiler. Check if one is available, and if
# necessary, set CXX_DIALECT to some -std=xxx switch.
AX_CXX_COMPILE_STDCXX(11, , mandatory)
AX_CXX_COMPILE_STDCXX(17, , mandatory)
# Dependency checking.
ZW_CREATE_DEPDIR

4
gdbserver/config.in

@ -28,8 +28,8 @@
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
/* define if the compiler supports basic C++17 syntax */
#undef HAVE_CXX17
/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
you don't. */

1970
gdbserver/configure

File diff suppressed because it is too large

4
gdbserver/configure.ac

@ -46,9 +46,9 @@ AC_PROG_RANLIB
AC_ARG_PROGRAM
# We require a C++11 compiler. Check if one is available, and if
# We require a C++17 compiler. Check if one is available, and if
# necessary, set CXX_DIALECT to some -std=xxx switch.
AX_CXX_COMPILE_STDCXX(11, , mandatory)
AX_CXX_COMPILE_STDCXX(17, , mandatory)
AC_HEADER_STDC

2
gdbsupport/Makefile.in

@ -252,7 +252,7 @@ EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_CXX11 = @HAVE_CXX11@
HAVE_CXX17 = @HAVE_CXX17@
HAVE_LIBIPT = @HAVE_LIBIPT@
HAVE_LIBXXHASH = @HAVE_LIBXXHASH@
INCINTL = @INCINTL@

4
gdbsupport/config.in

@ -28,8 +28,8 @@
*/
#undef HAVE_ALLOCA_H
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
/* define if the compiler supports basic C++17 syntax */
#undef HAVE_CXX17
/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
you don't. */

1970
gdbsupport/configure

File diff suppressed because it is too large

4
gdbsupport/configure.ac

@ -41,9 +41,9 @@ AC_PROG_RANLIB
AC_USE_SYSTEM_EXTENSIONS
ACX_LARGEFILE
# We require a C++11 compiler. Check if one is available, and if
# We require a C++17 compiler. Check if one is available, and if
# necessary, set CXX_DIALECT to some -std=xxx switch.
AX_CXX_COMPILE_STDCXX(11, , mandatory)
AX_CXX_COMPILE_STDCXX(17, , mandatory)
dnl Set up for gettext.
ZW_GNU_GETTEXT_SISTER_DIR

Loading…
Cancel
Save