From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EB54C43334 for ; Tue, 19 Jul 2022 18:52:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93FD984039; Tue, 19 Jul 2022 20:52:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="uPgUDyi9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDFE38405C; Tue, 19 Jul 2022 20:52:40 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9C52684039 for ; Tue, 19 Jul 2022 20:52:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 733DB617A0; Tue, 19 Jul 2022 18:52:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9919FC341C6; Tue, 19 Jul 2022 18:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658256756; bh=+4YJdQ99GF3k2JiVP4Bgr8gfPZnw80WxgWmwfNSPqKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uPgUDyi939yGByJPEwgn8H3Vaj1LmBd1jnKWPvJ7kBy1aDlKEGjSVSX65Y3KBwE7B /m30jAFzkXD4+WMQHdlBCGES00RO1MwMhDVF1edBFk8x/tfJ6u9ak6bM6qk4GdJw8c /kNl8SVpgWG6EyTRp3bk8sl7IAK547hMCpYnN9uxy1mU2O9q95W29qxabO38oOLe6s ReEuysFHojq2bJNxa1xlNXV0oGN5BN2JCYWalOdOOuFE7oZ70fhh78BXmNqk7iIPm/ TP42ovFkmC6twwNe9OnNSvodo89DNWHf3wXECbQmguPI8TWtbdx2OKnaRpVdr4f1LR acX+cNeN3RbwA== Received: by pali.im (Postfix) id D734AF3C; Tue, 19 Jul 2022 20:52:33 +0200 (CEST) Date: Tue, 19 Jul 2022 20:52:33 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Heiko Thiery Cc: u-boot@lists.denx.de, Stefan Roese , Simon Glass , Chris Packham , Marek =?utf-8?B?QmVow7pu?= , AKASHI Takahiro , Samuel Holland Subject: Re: [PATCH 2/2] tools: kwboot: use pkg-config to get -ltinfo Message-ID: <20220719185233.ppgukb5zarghy76g@pali> References: <20220719183837.536343-1-heiko.thiery@gmail.com> <20220719183837.536343-2-heiko.thiery@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220719183837.536343-2-heiko.thiery@gmail.com> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Tuesday 19 July 2022 20:38:39 Heiko Thiery wrote: > Instead of hardcoding -ltinfo as the flags needed to build > kwboot, use pkg-config when available. Interesting, I did not know that there is pc file also for tinfo. Anyway when using it, there should be also HOSTCFLAGS_kwboot definition from pkg-config. > We gracefully fallback on the previous behavior of hardcoding -ltinfo > if pkg-config is not available or fails with an error. > > Signed-off-by: Heiko Thiery > --- > tools/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/Makefile b/tools/Makefile > index 9f6b282ad8..45195a8ce7 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -198,7 +198,9 @@ hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl > HOSTCFLAGS_mkexynosspl.o := -pedantic > > HOSTCFLAGS_kwboot.o += -pthread > -HOSTLDLIBS_kwboot += -pthread -ltinfo > +HOSTLDLIBS_kwboot += -pthread > +HOSTLDLIBS_kwboot += \ > + $(shell pkg-config --libs tinfo 2> /dev/null || echo "-ltinfo") > > ifdtool-objs := $(LIBFDT_OBJS) ifdtool.o > hostprogs-$(CONFIG_X86) += ifdtool > -- > 2.30.2 >