From patchwork Tue Oct 30 17:28:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 29964 Received: (qmail 111596 invoked by alias); 30 Oct 2018 17:28:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 111585 invoked by uid 89); 30 Oct 2018 17:28:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=speak, ages 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; Tue, 30 Oct 2018 17:28:22 +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 D15E94E8BA; Tue, 30 Oct 2018 17:28:20 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id D47DD86FD9; Tue, 30 Oct 2018 17:28:19 +0000 (UTC) Subject: Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic. To: Corinna Vinschen References: <1540415244-4879-1-git-send-email-joel@rtems.org> <8bc11746-527b-b123-0879-0c4cbd81eda3@redhat.com> <20181025185014.GN3310@calimero.vinschen.de> Cc: joel@rtems.org, GDB patches From: Pedro Alves Message-ID: <16e94ff1-0c06-7cca-44b1-77bf2fa59519@redhat.com> Date: Tue, 30 Oct 2018 17:28:19 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181025185014.GN3310@calimero.vinschen.de> On 10/25/2018 07:50 PM, Corinna Vinschen wrote: > On Oct 25 16:30, Pedro Alves wrote: >> On 10/25/2018 04:01 PM, Joel Sherrill wrote: >>> On Thu, Oct 25, 2018 at 9:34 AM Pedro Alves wrote: >>> >>>> WDTY by "now"? >>>> >>>> I mean Cygwin used to include libtermcap and this built. I updated my >>> Cygwin this >>> week and it is no longer there. I wasn't able to figure out when it went >>> away. libncurses.a >>> is included and that's suitable. >>> >> >> That's so much clearer. >> >>> I cc'ed Corinna. I assume she can speak to when libtermcap.a was removed. > > I have no idea, ages ago. libncurses is used for a long time. Cygwin > should use the same autoconf code to figure out the correct lib as any > other target. Thanks, I've added info the commit log and applied the patch, as below. From c1230d1bab8e36e1aa40f3bbadcef9b5d9ddc041 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 30 Oct 2018 16:41:12 +0000 Subject: [PATCH] [src/erc32] Use ncurses instead of termcap on Cygwin too This removes a Cygwin-specific libtermcap hack that was dependent on the presence of one of the multiple alternative libraries. The one it was hard-coded to pick isn't included with Cygwin anymore. According to Corinna, libtermcap was removed from Cygwin a long time ago, and libncurses is used in Cygwin for a long time too. The fix is to make Cygwin use the same autoconf code to figure out the correct lib as any other target. sim/erc32/Changelog: 2018-10-30 Joel Sherrill * configure.ac: Remove the Cygwin-specific libtermcap.a hack and use the standard logic to determine which library to use. * configure: Regenerate. --- sim/erc32/ChangeLog | 6 ++++++ sim/erc32/configure | 10 +++++----- sim/erc32/configure.ac | 9 ++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index e2b0232a36..088a2a4b45 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,9 @@ +2018-10-30 Joel Sherrill + + * configure.ac: Remove the Cygwin-specific libtermcap.a hack + and use the standard logic to determine which library to use. + * configure: Regenerate. + 2017-09-06 John Baldwin * configure: Regenerate. diff --git a/sim/erc32/configure b/sim/erc32/configure index 1f9a962c47..4efb9b6fbc 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -13548,11 +13548,9 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5 $as_echo "$sim_cv_os_cygwin" >&6; } -if test x$sim_cv_os_cygwin = xyes; then - TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' -else - # Keep in sync with gdb's configure.ac list. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 + +# Keep in sync with gdb's configure.ac list. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if ${ac_cv_search_tgetent+:} false; then : $as_echo_n "(cached) " >&6 @@ -13610,6 +13608,8 @@ else TERMCAP="" fi +if test x$sim_cv_os_cygwin = xyes; then + TERMCAP="${TERMCAP} -luser32" fi diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac index 3135dc55ec..e4df81989c 100644 --- a/sim/erc32/configure.ac +++ b/sim/erc32/configure.ac @@ -26,12 +26,11 @@ AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, lose #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) +# Keep in sync with gdb's configure.ac list. +AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], + [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) if test x$sim_cv_os_cygwin = xyes; then - TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' -else - # Keep in sync with gdb's configure.ac list. - AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], - [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) + TERMCAP="${TERMCAP} -luser32" fi AC_SUBST(TERMCAP)