From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118412 invoked by alias); 7 Aug 2019 14:42:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 118404 invoked by uid 89); 7 Aug 2019 14:42:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:209.85.128.68, H*RU:209.85.128.68 X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Aug 2019 14:42:17 +0000 Received: by mail-wm1-f68.google.com with SMTP id 207so323741wma.1 for ; Wed, 07 Aug 2019 07:42:17 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id o6sm197010909wra.27.2019.08.07.07.42.14 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 07:42:14 -0700 (PDT) Subject: Re: [PATCH 8/8] Require readline 7 or newer To: Tom Tromey , gdb-patches@sourceware.org References: <20190806204334.13441-1-tom@tromey.com> <20190806204334.13441-9-tom@tromey.com> From: Pedro Alves Message-ID: <91cf16b4-343b-1d47-ab5c-c8f2127cd4db@redhat.com> Date: Wed, 07 Aug 2019 14:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190806204334.13441-9-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00176.txt.bz2 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