From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] ncurses: generate libtermcap
Date: Sun, 19 Jul 2015 11:19:15 +0200 [thread overview]
Message-ID: <20150719111915.7248ebf9@free-electrons.com> (raw)
In-Reply-To: <1429880066-7743-1-git-send-email-pascal.mazon@6wind.com>
Thomas,
Can you have a look at the patch below? According to Pascal, the
submitter, it's related to an issue that appears with Cavium Octeon
toolchains which I believe you have access to. Apparently, the
toolchain ships with a libtermcap.a library, which causes some
troubles down the road.
Thanks!
Thomas
On Fri, 24 Apr 2015 14:54:26 +0200, Pascal Mazon wrote:
> There is no libtermcap package in buildroot, but ncurses implements termcap
> natively. Furthermore, ncurses already provides the termcap.h header file.
>
> With this patch, we fix an issue encountered with some external toolchains
> that include a libtermcap.a (typically the GNU libtermcap version) in their
> sysroot folder.
> Bash, for instance, would be linking with this libtermcap while using
> headers from ncurses.
>
> In order to be consistent, let's make sure there is only the ncurses'
> termcap library. To that effect, we:
> - remove any libtermcap.* in the staging dir,
> - install a link to libncurses static and/or shared in staging and target
> dirs.
>
> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
> ---
> package/ncurses/ncurses.mk | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
> index 8368c690b606..f4b03ed5db15 100644
> --- a/package/ncurses/ncurses.mk
> +++ b/package/ncurses/ncurses.mk
> @@ -112,6 +112,20 @@ ifneq ($(BR2_ENABLE_DEBUG),y)
> NCURSES_CONF_OPTS += --without-debug
> endif
>
> +define NCURSES_LINK_LIBTERMCAP
> + ln -sf libncurses$(NCURSES_LIB_SUFFIX).$(2) $(1)/usr/lib/libtermcap.$(2)
> +endef
> +
> +NCURSES_LINK_STAGING_TERMCAP = \
> + rm -f $(STAGING_DIR)/usr/lib/libtermcap.*; \
> + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBTERMCAP,$(STAGING_DIR),a);) \
> + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBTERMCAP,$(STAGING_DIR),so))
> +NCURSES_LINK_TARGET_TERMCAP = \
> + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBTERMCAP,$(TARGET_DIR),a);) \
> + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBTERMCAP,$(TARGET_DIR),so))
> +
> +NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_TERMCAP
> +
> # ncurses breaks with parallel build, but takes quite a while to
> # build single threaded. Work around it similar to how Gentoo does
> define NCURSES_BUILD_CMDS
> @@ -143,6 +157,7 @@ define NCURSES_INSTALL_TARGET_CMDS
> mkdir -p $(TARGET_DIR)/usr/lib
> $(NCURSES_INSTALL_TARGET_LIBS)
> $(NCURSES_LINK_TARGET_LIBS)
> + $(NCURSES_LINK_TARGET_TERMCAP)
> $(NCURSES_INSTALL_TARGET_PROGS)
> ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo
> mkdir -p $(TARGET_DIR)/usr/share/terminfo/x
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-07-19 9:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 12:54 [Buildroot] [PATCH 1/1] ncurses: generate libtermcap Pascal Mazon
2015-04-24 14:18 ` Thomas Petazzoni
2015-04-27 8:11 ` Pascal Mazon
2015-07-19 9:19 ` Thomas Petazzoni [this message]
2015-11-30 22:30 ` Thomas Petazzoni
2015-12-02 10:39 ` Pascal Mazon
2015-12-05 17:39 ` Yann E. MORIN
-- strict thread matches above, loose matches on Subject: below --
2015-05-20 9:11 Pascal Mazon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150719111915.7248ebf9@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox