This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 8/8] Require readline 7 or newer
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