From patchwork Tue Jul 10 16:46:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hollis Blanchard X-Patchwork-Id: 942108 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mentor.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Q7rv4YRnz9s01 for ; Wed, 11 Jul 2018 03:06:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id AF8A885E87; Tue, 10 Jul 2018 17:06:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vYC3G_OPQbOO; Tue, 10 Jul 2018 17:06:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1CBBE85F41; Tue, 10 Jul 2018 17:06:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 12D2E1C04AB for ; Tue, 10 Jul 2018 17:06:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 10514864EA for ; Tue, 10 Jul 2018 17:06:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kk+8p4heJiLO for ; Tue, 10 Jul 2018 17:06:18 +0000 (UTC) X-Greylist: delayed 00:18:39 by SQLgrey-1.7.6 Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by whitealder.osuosl.org (Postfix) with ESMTPS id 40CC1864AA for ; Tue, 10 Jul 2018 17:06:18 +0000 (UTC) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fcvne-0004mC-OA from Hollis_Blanchard@mentor.com for buildroot@busybox.net; Tue, 10 Jul 2018 09:47:38 -0700 Received: from SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 10 Jul 2018 09:47:36 -0700 Received: from cveaol6qa08.wv.mentorg.com (147.34.91.1) by SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Tue, 10 Jul 2018 09:47:36 -0700 MIME-Version: 1.0 X-Mercurial-Node: 5f7fe697b92ac0145674a6c96aad0f787b4bae32 X-Mercurial-Series-Index: 1 X-Mercurial-Series-Total: 1 Message-ID: <5f7fe697b92ac0145674.1531241163@cveaol6qa08.wv.mentorg.com> X-Mercurial-Series-Id: <5f7fe697b92ac0145674.1531241163@cveaol6qa08.wv.mentorg.com> User-Agent: Mercurial-patchbomb/4.4.1 Date: Tue, 10 Jul 2018 09:46:03 -0700 From: Hollis Blanchard To: Subject: [Buildroot] [PATCH] ncurses: make host-ncurses use host terminfo X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" # HG changeset patch # User Hollis Blanchard # Date 1531239381 25200 # Tue Jul 10 09:16:21 2018 -0700 # Node ID 5f7fe697b92ac0145674a6c96aad0f787b4bae32 # Parent d71314cdccf1993ccdb05cddb16a5491f0bf723e ncurses: make host-ncurses use host terminfo Host GDB suffers a serious problem: pressing backspace (or ^W ^U or any other "delete" key) results in a plain space being printed instead, making the command prompt almost completely unusable. That's because it's using host-ncurses, which embeds a path for the terminfo database into the library itself. That path ends up being something like /home/hollisb/buildroot.git/output/host/share/terminfo, which obviously doesn't generally exist other hosts. ('relocate-sdk.sh' cannot and does not edit binaries like libncurses.so.6, so doesn't resolve this problem.) /usr/share/terminfo is a far better path to use, since it almost certainly exists on the host. Theoretically, it could be from a different ncurses version with incompatible terminfo database format, but this doesn't seem to be a problem in practice. (Future patches could address the theoretical problem if it actually appears in real life.) This change allows buildroot's host gdb, which uses ncurses 6.x, to work on RHEL5, RHEL6, and RHEL7, which all provide terminfo from ncurses 5.x. Signed-off-by: Hollis Blanchard Reviewed-by: Arnout Vandecappelle (Essensium/Mind) diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -153,6 +153,7 @@ HOST_NCURSES_CONF_OPTS = \ --without-cxx \ --without-cxx-binding \ --without-ada \ + --with-default-terminfo-dir=/usr/share/terminfo \ --without-normal $(eval $(autotools-package))