[8/8] Require readline 7 or newer
Commit Message
This changes gdb to require readline 7 or newer at build time.
2019-04-21 Tom Tromey <tom@tromey.com>
* README: Update.
* event-top.c: Require readline 7.
gdb/doc/ChangeLog
2019-04-21 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Configure Options): Document minimum version of
readline.
---
gdb/ChangeLog | 5 +++++
gdb/README | 3 ++-
gdb/doc/ChangeLog | 5 +++++
gdb/doc/gdb.texinfo | 3 ++-
gdb/event-top.c | 3 +++
5 files changed, 17 insertions(+), 2 deletions(-)
Comments
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Tue, 6 Aug 2019 14:43:34 -0600
>
> This changes gdb to require readline 7 or newer at build time.
>
> 2019-04-21 Tom Tromey <tom@tromey.com>
>
> * README: Update.
> * event-top.c: Require readline 7.
>
> gdb/doc/ChangeLog
> 2019-04-21 Tom Tromey <tom@tromey.com>
>
> * gdb.texinfo (Configure Options): Document minimum version of
> readline.
The documentation parts are OK, thanks.
On 8/6/19 9:43 PM, Tom Tromey wrote:
> @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.
>
> --- a/gdb/event-top.c
> +++ b/gdb/event-top.c
> @@ -48,6 +48,9 @@
> /* readline defines this. */
> #undef savestring
>
> +/* gdb requires readline 7 now. */
> +gdb_static_assert (RL_VERSION_MAJOR >= 7);
> +
I'd be much better user experience if this were done at by the
build system, at configure time, with AC_TRY_COMPILE, IMO. Something
similar to the "GNU regex" check should do it.
As is, it's plausible that the build would error out failing to compile
some other .c file that happened to use some readline symbol/struct/function/etc.
that only exists in the supported readline. Alternatively, we could have
some gdb_readline.h wrapper header and do the check there, though a configure
check seems natural to me and should be simple.
Thanks,
Pedro Alves
On 8/6/19 9:43 PM, Tom Tromey wrote:
> This changes gdb to require readline 7 or newer at build time.
>
> 2019-04-21 Tom Tromey <tom@tromey.com>
>
> * README: Update.
> * event-top.c: Require readline 7.
>
> gdb/doc/ChangeLog
> 2019-04-21 Tom Tromey <tom@tromey.com>
>
> * gdb.texinfo (Configure Options): Document minimum version of
> readline.
This should be mentioned in gdb/NEWS too, IMO.
Thanks,
Pedro Alves
@@ -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
@@ -36897,7 +36897,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
@@ -48,6 +48,9 @@
/* readline defines this. */
#undef savestring
+/* gdb requires readline 7 now. */
+gdb_static_assert (RL_VERSION_MAJOR >= 7);
+
static std::string top_level_prompt ();
/* Signal handlers. */