Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4412976pxu; Tue, 1 Dec 2020 04:30:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJykRRBPGYhpwig5s68AH8RDfVQoaFwBYZkpTaBWkDZ62DhE6mLQD8BX2fScwMkEWjHTn1lM X-Received: by 2002:aa7:d54a:: with SMTP id u10mr2828688edr.168.1606825834798; Tue, 01 Dec 2020 04:30:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606825834; cv=none; d=google.com; s=arc-20160816; b=qAf1CZbvv6tfcHNtxaPfoBRcGuIByWEFF5puixlSNhqGeKoBZfKNURMNb4ExeaReY9 dT4XqX465xq2K0UKbajUkRcMRuAwVy1jCEw/ZzmcrOBSg7tj8OZy9L0LxIqKasaoEuTx MgPdr57ytYMLGML6Px1npccyq9C2M252MtEvPPdZ/Pe9rq9jckodrh8fZYhEmdAoo3Nk rtMoOk4nnhsXgC+CVESqNkUkHEXtpUYGWy57LuRM43DCLXosxh5jvED1s8DDjubVQthz 6h8zv0ijmXSjwvy3wYoC/1YECbxhPKtIIyNLqryCdXE1q2R6m25zp0z9cmdyUbcJ4gO3 TWoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=KWhXf126QdKZSIcCJw3jkh2GX10MniKd1jCj0kydoFw=; b=MDCYAY3VEGyoQ35ZmyW7e1zjErtud+iYS9z70ymvQlHU9Gyou2u1zNlK8JJHt1BH+N 30heJVU/zgmrS37fWpFLXDagA6YL1GjOBQ6rw0I/W5EvmnAib5AfS2aAWDC3705CalWl tj9F49RR+09kMan+W2fAKNJlnPc5iGE5KJ7+53erKo2QW+vv9V65Stp9pG7iVeTsmuRv xKIP0raAp25k6duICAJ0/gCcondXoLcYA9dLDTSF+BH1JB+ORd7lZ/OWaLlGLJB2O66F 3MygeO3w1vNJyE55URuqbW0oi++t24zHZgLUlvB7c9mTNVepMWIT20hjoEQBxAUzu+eo OQfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nJfgxtSf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si851869eju.318.2020.12.01.04.29.42; Tue, 01 Dec 2020 04:30:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nJfgxtSf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728634AbgLAM1h (ORCPT + 99 others); Tue, 1 Dec 2020 07:27:37 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:41466 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgLAM1h (ORCPT ); Tue, 1 Dec 2020 07:27:37 -0500 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 0B1CQWoB009844; Tue, 1 Dec 2020 21:26:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 0B1CQWoB009844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1606825593; bh=KWhXf126QdKZSIcCJw3jkh2GX10MniKd1jCj0kydoFw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nJfgxtSftWBlTEWVRbAeA1HNHcvxd6vqlY3IDtDzIPGx3weWblfqIepRRZLUYVnlj X4623+/a44Ec7DYryjwWxZgPC+tXZ/BVTKwvMla2Ipr+m544Qw9qnqBBc3CWdTqGZI SABly++IBGRjSrVs3/VNT5LowTIsjDK6Doqi+KnyE6bJ077uiDm26c8juHY/gtEGi5 6v8IGqH2toM0aLPmbIcEMLlVoNYL/dMyxLKrcIwnRVtHkAzmqd1blQ2ydRTerBRxsw vOYGM86e/PPxDrJpownLV4sdioCtRQeMlBmiVMOz7xjdnzgKrH9ZlLvRWCa8DDRijp nJ4GEYrtfaLJw== X-Nifty-SrcIP: [209.85.216.48] Received: by mail-pj1-f48.google.com with SMTP id v1so1129771pjr.2; Tue, 01 Dec 2020 04:26:32 -0800 (PST) X-Gm-Message-State: AOAM533aih94qkAQmebMSGtBs6ep7SJEiAnBCbRZu3sv/i8a8Usr34HG 6Pc3GiQL9kr96t6j7DZKJuqsHxE6aWZe1Kl63P0= X-Received: by 2002:a17:90a:c209:: with SMTP id e9mr2490401pjt.87.1606825592194; Tue, 01 Dec 2020 04:26:32 -0800 (PST) MIME-Version: 1.0 References: <20201128004505.27619-1-scott.branden@broadcom.com> In-Reply-To: <20201128004505.27619-1-scott.branden@broadcom.com> From: Masahiro Yamada Date: Tue, 1 Dec 2020 21:25:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location To: Scott Branden Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Broadcom Kernel Feedback List , Bruce Ashfield , Bruce Ashfield , Jason Wessel , Michal Marek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 28, 2020 at 9:45 AM Scott Branden wrote: > > From: Bruce Ashfield > > In some cross build environments such as the Yocto Project build > environment it provides an ncurses library that is compiled > differently than the host's version. This causes display corruption > problems when the host's curses includes are used instead of the > includes from the provided compiler are overridden. There is a second > case where there is no curses libraries at all on the host system and > menuconfig will just fail entirely. > > The solution is simply to allow an override variable in > check-lxdialog.sh for environments such as the Yocto Project. Adding > a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing > compiling and linking against the right headers and libraries. > > Signed-off-by: Jason Wessel > cc: Michal Marek > cc: linux-kbuild@vger.kernel.org > Signed-off-by: Bruce Ashfield > Signed-off-by: Scott Branden > --- Some people solve the cross-compiling in Yocto by using pkg-config. For example, commit 067c650c456e758f933aaf87a202f841d34be269 Author: Pavel Modilaynen Date: Fri Jul 12 13:52:19 2019 +0200 dtc: Use pkg-config to locate libyaml Using Makefile's wildcard with absolute path to detect the presence of libyaml results in false-positive detection when cross-compiling e.g. in yocto environment. mconf-cfg.sh already allows the path flexibility with pkg-config. Why do you want yet another hook? > scripts/kconfig/mconf-cfg.sh | 8 ++++++++ > 1 file changed, 8 insertions(+) > mode change 100755 => 100644 scripts/kconfig/mconf-cfg.sh > > diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh > old mode 100755 > new mode 100644 > index aa68ec95620d..32448bc198a5 > --- a/scripts/kconfig/mconf-cfg.sh > +++ b/scripts/kconfig/mconf-cfg.sh > @@ -4,6 +4,14 @@ > PKG="ncursesw" > PKG2="ncurses" > > +if [ "$CROSS_CURSES_LIB" != "" ]; then > + echo libs=\'$CROSS_CURSES_LIB\' > + if [ x"$CROSS_CURSES_INC" != x ]; then > + echo cflags=\'$CROSS_CURSES_INC\' > + fi > + exit 0 > +fi > + > if [ -n "$(command -v pkg-config)" ]; then > if pkg-config --exists $PKG; then > echo cflags=\"$(pkg-config --cflags $PKG)\" > -- > 2.17.1 > -- Best Regards Masahiro Yamada