Message ID | 20180131210430.23787-1-sergiodj@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 43671 invoked by alias); 31 Jan 2018 21:04:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43651 invoked by uid 89); 31 Jan 2018 21:04:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=our X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jan 2018 21:04:39 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B87494B708 for <gdb-patches@sourceware.org>; Wed, 31 Jan 2018 21:04:37 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FC055C881; Wed, 31 Jan 2018 21:04:32 +0000 (UTC) From: Sergio Durigan Junior <sergiodj@redhat.com> To: GDB Patches <gdb-patches@sourceware.org> Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, Sergio Durigan Junior <sergiodj@redhat.com> Subject: [PATCH] Check for ncursesw first when searching for "tgetent" Date: Wed, 31 Jan 2018 16:04:30 -0500 Message-Id: <20180131210430.23787-1-sergiodj@redhat.com> X-IsSubscribed: yes |
Commit Message
Sergio Durigan Junior
Jan. 31, 2018, 9:04 p.m. UTC
Commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181 ("Allow linking GDB with ncursesw") modified our configure.ac and included the check for "ncursesw" when searching for "waddstr". However, there's one more place where we should check for "ncursesw" first: AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) This patch changes the order of the libraries to be searched when looking for "tgetent", and puts "ncursesw" before "curses ...". This is another patch we carry on Fedora GDB. gdb/ChangeLog: 2018-01-31 Sergio Durigan Junior <sergiodj@redhat.com> * configure.ac: Check for "ncursesw" first when searching for "tgetent". * configure: Regenerate. --- gdb/configure | 2 +- gdb/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Wednesday, January 31 2018, I wrote: > Commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181 ("Allow linking GDB > with ncursesw") modified our configure.ac and included the check for > "ncursesw" when searching for "waddstr". However, there's one more > place where we should check for "ncursesw" first: > > AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) > > This patch changes the order of the libraries to be searched when > looking for "tgetent", and puts "ncursesw" before "curses ...". > > This is another patch we carry on Fedora GDB. Ping. > gdb/ChangeLog: > 2018-01-31 Sergio Durigan Junior <sergiodj@redhat.com> > > * configure.ac: Check for "ncursesw" first when searching for > "tgetent". > * configure: Regenerate. > --- > gdb/configure | 2 +- > gdb/configure.ac | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdb/configure b/gdb/configure > index 81b35af521..c552c1ab1f 100755 > --- a/gdb/configure > +++ b/gdb/configure > @@ -8912,7 +8912,7 @@ return tgetent (); > return 0; > } > _ACEOF > -for ac_lib in '' termcap tinfo curses ncursesw ncurses; do > +for ac_lib in '' termcap tinfo ncursesw curses ncurses; do > if test -z "$ac_lib"; then > ac_res="none required" > else > diff --git a/gdb/configure.ac b/gdb/configure.ac > index 125e5f30e6..a73f72d0a8 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -609,7 +609,7 @@ case $host_os in > esac > > # These are the libraries checked by Readline. > -AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) > +AC_SEARCH_LIBS(tgetent, [termcap tinfo ncursesw curses ncurses]) > > if test "$ac_cv_search_tgetent" = no; then > CONFIG_OBS="$CONFIG_OBS stub-termcap.o" > -- > 2.14.3
On 2018-01-31 04:04 PM, Sergio Durigan Junior wrote: > Commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181 ("Allow linking GDB > with ncursesw") modified our configure.ac and included the check for > "ncursesw" when searching for "waddstr". However, there's one more > place where we should check for "ncursesw" first: > > AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) > > This patch changes the order of the libraries to be searched when > looking for "tgetent", and puts "ncursesw" before "curses ...". > > This is another patch we carry on Fedora GDB. I think it makes sense, but can you expand on why this is needed? Thanks, Simon
On Monday, February 12 2018, Simon Marchi wrote: > On 2018-01-31 04:04 PM, Sergio Durigan Junior wrote: >> Commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181 ("Allow linking GDB >> with ncursesw") modified our configure.ac and included the check for >> "ncursesw" when searching for "waddstr". However, there's one more >> place where we should check for "ncursesw" first: >> >> AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) >> >> This patch changes the order of the libraries to be searched when >> looking for "tgetent", and puts "ncursesw" before "curses ...". >> >> This is another patch we carry on Fedora GDB. > > I think it makes sense, but can you expand on why this is needed? The rationale for this patch was: https://bugzilla.redhat.com/show_bug.cgi?id=1270534 This is a bug that happened on Fedora GDB when linking against ncurses, but not ncursesw. The bug has been fixed upstream by commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181, but the AC_SEARCH_LIBS line for tgetent has not been modified, so, for the sake of completeness, I think it makes sense to leave configure.ac in a consistent state (i.e., requiring ncursesw over ncurses whenever applicable). I guess that's the gist of it. There's not much that can be said, the patch is really simple and its intention is to make things more uniform. I can include the link to the Red Hat bug in the commit message, if you want. Thanks,
On Tuesday, February 13 2018, I wrote: > On Monday, February 12 2018, Simon Marchi wrote: > >> On 2018-01-31 04:04 PM, Sergio Durigan Junior wrote: >>> Commit 5007d765ae09c10c7f3b18bb16841b9d2d59e181 ("Allow linking GDB >>> with ncursesw") modified our configure.ac and included the check for >>> "ncursesw" when searching for "waddstr". However, there's one more >>> place where we should check for "ncursesw" first: >>> >>> AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) >>> >>> This patch changes the order of the libraries to be searched when >>> looking for "tgetent", and puts "ncursesw" before "curses ...". >>> >>> This is another patch we carry on Fedora GDB. >> >> I think it makes sense, but can you expand on why this is needed? > > The rationale for this patch was: > > https://bugzilla.redhat.com/show_bug.cgi?id=1270534 > > This is a bug that happened on Fedora GDB when linking against ncurses, > but not ncursesw. The bug has been fixed upstream by commit > 5007d765ae09c10c7f3b18bb16841b9d2d59e181, but the AC_SEARCH_LIBS line > for tgetent has not been modified, so, for the sake of completeness, I > think it makes sense to leave configure.ac in a consistent state (i.e., > requiring ncursesw over ncurses whenever applicable). > > I guess that's the gist of it. There's not much that can be said, the > patch is really simple and its intention is to make things more uniform. > > I can include the link to the Red Hat bug in the commit message, if you > want. After talking to Pedro in private, I was convinced that this is not the right explanation for the patch, either. Therefore, I will write a better commit message and submit a v2, hopefully addressing your concerns. Thanks,
diff --git a/gdb/configure b/gdb/configure index 81b35af521..c552c1ab1f 100755 --- a/gdb/configure +++ b/gdb/configure @@ -8912,7 +8912,7 @@ return tgetent (); return 0; } _ACEOF -for ac_lib in '' termcap tinfo curses ncursesw ncurses; do +for ac_lib in '' termcap tinfo ncursesw curses ncurses; do if test -z "$ac_lib"; then ac_res="none required" else diff --git a/gdb/configure.ac b/gdb/configure.ac index 125e5f30e6..a73f72d0a8 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -609,7 +609,7 @@ case $host_os in esac # These are the libraries checked by Readline. -AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) +AC_SEARCH_LIBS(tgetent, [termcap tinfo ncursesw curses ncurses]) if test "$ac_cv_search_tgetent" = no; then CONFIG_OBS="$CONFIG_OBS stub-termcap.o"