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 86650C43334 for ; Tue, 19 Jul 2022 19:20:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72F3E84068; Tue, 19 Jul 2022 21:20:12 +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="ZHsBty2x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65B378406A; Tue, 19 Jul 2022 21:20:11 +0200 (CEST) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (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 48B7884044 for ; Tue, 19 Jul 2022 21:20:09 +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 sin.source.kernel.org (Postfix) with ESMTPS id 3FBF3CE1D87; Tue, 19 Jul 2022 19:20:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 663FBC341C6; Tue, 19 Jul 2022 19:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658258404; bh=wZ6sGc6ydvy7xFwh0sp7gIuaoPF6yARaW5JjDRy7IGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZHsBty2xc7Y4zYbXK/tcQT1stz+FdrRjcjETpLF1y+RxwlevmNopwS74DFKdrpPQs ZSqDp1/+YkK9wq+9uyZyGldrAQkbKAH+Nul7NysWH2EOJCSBO64GjqtWMPqocSSIDQ 9tUCFJIzOoOy9tvZHj34142RQq/k92H61Eb/Bywv8aXyQ2yiZBiuD7mJ16rG2pWMuJ DethQAi5niBt37FiFf4gC/bUdrptM72U4o6WibnwcMGwJ4xbLtik0RoTc16SJ7JzsO 9d6kDzd1P5janfBCcUcpVLD3LGX2dzs2fElN6uHAOcI2ieQ2m0Tf+/WfId3/kMIleO 3PtyaB7MkQiGw== Received: by pali.im (Postfix) id 05FA1F3C; Tue, 19 Jul 2022 21:20:02 +0200 (CEST) Date: Tue, 19 Jul 2022 21:20:01 +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: <20220719192001.5ze3ux2kvwjohcaj@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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. > > 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 So... in current form this patch is OK. Reviewed-by: Pali Rohár > --- > 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 >