* [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
@ 2018-10-24 21:07 Joel Sherrill
2018-10-25 14:34 ` Pedro Alves
0 siblings, 1 reply; 7+ messages in thread
From: Joel Sherrill @ 2018-10-24 21:07 UTC (permalink / raw)
To: gdb-patches; +Cc: Joel Sherrill
sim/erc32/Changelog:
2018-10-24 Joel Sherrill <joel@rtems.org>
* configure.ac: Cygwin now has ncurses not termcap. Use standard
logic.
* 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 e2b0232..6a2f45d 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,9 @@
+2018-10-24 Joel Sherrill <joel@rtems.org>
+
+ * configure.ac: Cygwin now has ncurses not termcap. Use standard
+ logic.
+ * configure: Regenerate.
+
2017-09-06 John Baldwin <jhb@FreeBSD.org>
* configure: Regenerate.
diff --git a/sim/erc32/configure b/sim/erc32/configure
index 1f9a962..4efb9b6 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 3135dc5..e4df819 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)
--
1.8.3.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-24 21:07 [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic Joel Sherrill
@ 2018-10-25 14:34 ` Pedro Alves
2018-10-25 15:02 ` Joel Sherrill
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2018-10-25 14:34 UTC (permalink / raw)
To: Joel Sherrill, gdb-patches
WDTY by "now"?
Could you add some rationale words to the proposed commit log, please?
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-25 14:34 ` Pedro Alves
@ 2018-10-25 15:02 ` Joel Sherrill
2018-10-25 15:31 ` Pedro Alves
0 siblings, 1 reply; 7+ messages in thread
From: Joel Sherrill @ 2018-10-25 15:02 UTC (permalink / raw)
To: palves, Corinna Vinschen; +Cc: GDB patches
On Thu, Oct 25, 2018 at 9:34 AM Pedro Alves <palves@redhat.com> 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.
I cc'ed Corinna. I assume she can speak to when libtermcap.a was removed.
Corring
> Could you add some rationale words to the proposed commit log, please?
>
Like what? This removes a hack that was dependent on the presence of one
of the multiple alternative libraries. And the one it was hard-coded to
pick isn't
included with Cygwin anymore.
Happy to change the text but it felt like I was removing a hack that had
outlived
its usefulness. :)
--joel
>
> Thanks,
> Pedro Alves
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-25 15:02 ` Joel Sherrill
@ 2018-10-25 15:31 ` Pedro Alves
2018-10-25 18:50 ` Corinna Vinschen
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2018-10-25 15:31 UTC (permalink / raw)
To: joel, Corinna Vinschen; +Cc: GDB patches
On 10/25/2018 04:01 PM, Joel Sherrill wrote:
> On Thu, Oct 25, 2018 at 9:34 AM Pedro Alves <palves@redhat.com> 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.
>
> Corring
>
>
>> Could you add some rationale words to the proposed commit log, please?
>>
>
> Like what? This removes a hack that was dependent on the presence of one
> of the multiple alternative libraries. And the one it was hard-coded to
> pick isn't
> included with Cygwin anymore.
That too is useful information.
>
> Happy to change the text but it felt like I was removing a hack that had
> outlived
> its usefulness. :)
And that too.
The problem is that you had no text at all beyond the ChangeLog. See:
https://sourceware.org/gdb/wiki/ContributionChecklist#Detailed_Explanation_of_the_Patch
Particularly, 3.1, first bullet.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-25 15:31 ` Pedro Alves
@ 2018-10-25 18:50 ` Corinna Vinschen
2018-10-30 17:28 ` Pedro Alves
0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2018-10-25 18:50 UTC (permalink / raw)
To: Pedro Alves; +Cc: joel, GDB patches
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 <palves@redhat.com> 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.
Corinna
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-25 18:50 ` Corinna Vinschen
@ 2018-10-30 17:28 ` Pedro Alves
2018-10-30 20:22 ` Corinna Vinschen
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2018-10-30 17:28 UTC (permalink / raw)
To: Corinna Vinschen; +Cc: joel, GDB patches
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 <palves@redhat.com> 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 <joel@rtems.org>
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 <joel@rtems.org>
* 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 <joel@rtems.org>
+
+ * 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 <jhb@FreeBSD.org>
* 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)
--
2.14.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic.
2018-10-30 17:28 ` Pedro Alves
@ 2018-10-30 20:22 ` Corinna Vinschen
0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2018-10-30 20:22 UTC (permalink / raw)
To: Pedro Alves; +Cc: joel, GDB patches
Hi Pedro,
I didn't see the patch before, sorry. I have an additional nit:
On Oct 30 17:28, Pedro Alves wrote:
> 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 <palves@redhat.com> 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.
> [...]
> 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"
This entire special code block for Cygwin should go away. The only
reason to keep it is to add -luser32, but that's default for Cygwin
applications anyway, per the GCC config(*). The less special cases in
configure, the better, me thinks.
Thanks,
Corinna
(*) https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=blob;f=gcc/config/i386/cygwin.h;h=fd7df56a18a5b44315eaac821f8ef65e41dcca46;hb=HEAD#l92
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-10-30 20:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 21:07 [PATCH] configure.ac: Cygwin now has ncurses not termcap. Use standard logic Joel Sherrill
2018-10-25 14:34 ` Pedro Alves
2018-10-25 15:02 ` Joel Sherrill
2018-10-25 15:31 ` Pedro Alves
2018-10-25 18:50 ` Corinna Vinschen
2018-10-30 17:28 ` Pedro Alves
2018-10-30 20:22 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).