]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Require readline 7 or newer
authorTom Tromey <tom@tromey.com>
Sun, 21 Apr 2019 19:58:49 +0000 (13:58 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 12 Aug 2019 16:57:56 +0000 (10:57 -0600)
This changes gdb to require readline 7 or newer at build time.

gdb/ChangeLog
2019-08-12  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.
* configure.ac: Check for readline 7.
* NEWS: Mention readline 7 requirement.
* README: Update.

gdb/doc/ChangeLog
2019-08-12  Tom Tromey  <tom@tromey.com>

* gdb.texinfo (Configure Options): Document minimum version of
readline.

gdb/ChangeLog
gdb/NEWS
gdb/README
gdb/configure
gdb/configure.ac
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index e13415518fc8a033324a9495a3c4614206169ddd..12998aa2b1424aad3017266f19333e71c60e8564 100644 (file)
@@ -1,3 +1,10 @@
+2019-08-12  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+       * configure.ac: Check for readline 7.
+       * NEWS: Mention readline 7 requirement.
+       * README: Update.
+
 2019-08-12  Tom Tromey  <tom@tromey.com>
 
        * mingw-hdep.c (gdb_select): Remove readline hack.
index fa01adf6e894ac81c534ce40deeafab846a63e91..462247f4861d715a6d7aee78fa298567f87f8713 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -299,6 +299,11 @@ maint show test-options-completion-result
   Using another implementation of the make program or an earlier version of
   GNU make to build GDB or GDBserver is not supported.
 
+* Building GDB now requires GNU readline >= 7.0.
+
+  GDB now bundles GNU readline 8.0, but if you choose to use
+  --with-system-readline, only readline >= 7.0 can be used.
+
 *** Changes in GDB 8.3
 
 * GDB and GDBserver now support access to additional registers on
index 8a91aab2a4c644690782d34f7b33835cc8d65440..8883a8a09e3dd3079533514cd639729dfe201428 100644 (file)
@@ -439,7 +439,8 @@ more obscure GDB `configure' options are not listed here.
 
 `--with-system-readline'
      Use the readline library installed on the host, rather than the
-     library supplied as part of GDB.
+     library supplied as part of GDB.  Readline 7 or newer is required;
+     this is enforced by the build system.
 
 `--with-system-zlib
      Use the zlib library installed on the host, rather than the
index 9206f0e7f887d5100b4f5358bdbf68f9a19b5495..2832c836177602493e69ed4c26a2de6dc3025f7e 100755 (executable)
@@ -8952,6 +8952,38 @@ fi
 
 
 if test "$with_system_readline" = yes; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
+$as_echo_n "checking whether system readline is new enough... " >&6; }
+if ${gdb_cv_readline_ok+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <readline/readline.h>
+int
+main ()
+{
+#if RL_VERSION_MAJOR < 7
+# error "readline version 7 required"
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gdb_cv_readline_ok=yes
+else
+  gdb_cv_readline_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
+$as_echo "$gdb_cv_readline_ok" >&6; }
+  if test "$gdb_cv_readline_ok" != yes; then
+    as_fn_error $? "system readline is not new enough" "$LINENO" 5
+  fi
+
   READLINE=-lreadline
   READLINE_DEPS=
   READLINE_CFLAGS=
index 05b722b7f11a163e3936e0482e26c65d8bd3cb93..0979109d976582877a2abb636db4c3e4fa712978 100644 (file)
@@ -581,6 +581,20 @@ AC_ARG_WITH([system-readline],
                   [use installed readline library])])
 
 if test "$with_system_readline" = yes; then
+   AC_CACHE_CHECK([whether system readline is new enough],
+     [gdb_cv_readline_ok],
+     [AC_TRY_COMPILE(
+       [#include <stdio.h>
+#include <readline/readline.h>],
+       [#if RL_VERSION_MAJOR < 7
+# error "readline version 7 required"
+#endif],
+    gdb_cv_readline_ok=yes,
+    gdb_cv_readline_ok=no)])
+  if test "$gdb_cv_readline_ok" != yes; then
+    AC_MSG_ERROR([system readline is not new enough])
+  fi
+
   READLINE=-lreadline
   READLINE_DEPS=
   READLINE_CFLAGS=
index 5b55e0593cb44c9b681807a20560893648e5a3a3..971e9c311ae7060e1ae02ec4cbcb1301839190a0 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-12  Tom Tromey  <tom@tromey.com>
+
+       * gdb.texinfo (Configure Options): Document minimum version of
+       readline.
+
 2019-08-09  Alan Hayward  <alan.hayward@arm.com>
 
         * gdb.texinfo (AArch64 Pointer Authentication): Fix typo.
index c8ca757989cf10559bab47297931e3856c7b28aa..523e3d0bfe13aba5feaa62c2d9d4b19966b4a533 100644 (file)
@@ -36905,7 +36905,8 @@ details.
 
 @item --with-system-readline
 Use the readline library installed on the host, rather than the
-library supplied as part of @value{GDBN}.
+library supplied as part of @value{GDBN}.  Readline 7 or newer is
+required; this is enforced by the build system.
 
 @item --with-system-zlib
 Use the zlib library installed on the host, rather than the library