Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929365ybl; Thu, 2 Jan 2020 15:01:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxgzA1Si7BBtRLnQeBAjQyAqZRdpFd+USCvEpE1Uohe6mvoeDeSXMZ6epknR1b0U+FOuNix X-Received: by 2002:aca:2114:: with SMTP id 20mr3253631oiz.9.1578006104586; Thu, 02 Jan 2020 15:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006104; cv=none; d=google.com; s=arc-20160816; b=0+DrqMk5HBz9gv0HC5D/1yf+fblDlDMvl3/iYHO661wrT6AmDXqk5YxHEMH10e5udx jovoEOUbnH08NYRfWVEiTb+jHh1UHJrNLpslyN77sUbK4NY87vNEr8yXqbzM4wyJ1wND nxuT2Nkb5lkx6gk60jYuN3mYtHb16sHiodHgSsG7aR2i7jkRPXLEihPywmnBemD7O19y aTuXH66jmEeRLldYlZBalR3QeU9tl+7TNWX3T6S/aYUMi8iPA2WFtU6xN6M/GFdTzYQM 68dUT4FWity68Gga7wrLuSyfMfdxrJ6jywm8BV8FH6FFD3Hi/Am+n9Y6lxN3G9NGVAmR JEVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CGLCSPIzCJtPbCw+P3/fAX5/QmP1mQb7DiwHmEbWeVU=; b=O8EUimrhOSasMy7fjJVuKrw3EYB+fxcaEUjvybIzidf5iAbMN7oWK+h8Gx5vgbzh4B v0p/K8eWvJlHJaYyp+qkTG2170NV0QxS057uy+3IIdwBqb40nnh0SBP24RxCbJOrakQz lYp3oIOcFlBdS1ZeNu4Gtfo74viUFG5sBrBw7OYfaGsGUftYngkD+UrXzwhrvM0SOmYC i3hDG0qqIvTH2bjFs1q3QU78QihvxKCFNyGS/+4YVc/BAdhh801e8cnWWpVvmDEaIYaS lXIlIn7Un6Ur9DpnB+vtIVRmswJK1H9xtemz4NKkKJbjQ6fzxO3Y+0Og9+O3Br7HovOE tP0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U5Hm7Lgy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si22047504oic.176.2020.01.02.15.01.33; Thu, 02 Jan 2020 15:01:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U5Hm7Lgy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728143AbgABXAF (ORCPT + 99 others); Thu, 2 Jan 2020 18:00:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:53198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727379AbgABWN0 (ORCPT ); Thu, 2 Jan 2020 17:13:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F4512253D; Thu, 2 Jan 2020 22:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003206; bh=4X3EMyJ0yJG6dcvF3YVvO9otDvVgBRj4flXFT3gicCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5Hm7LgyowJIw9aJSBS2D0KXaz13pqz1pTC4ZbL892gyikYYDn8g71FfYT1+fgxTh dWoA3mByAwVuJIiaKfXZRRQJbmpb4Ph+ijU0OaOplTI++4n6w85lfDAyy7cQBA256m IfwM4H7uueNJIY5TeFZJhszdA4TN6oIHqGYjr0KM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Modilaynen , Rob Herring , Sasha Levin Subject: [PATCH 5.4 038/191] dtc: Use pkg-config to locate libyaml Date: Thu, 2 Jan 2020 23:05:20 +0100 Message-Id: <20200102215834.015953905@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Modilaynen [ Upstream commit 067c650c456e758f933aaf87a202f841d34be269 ] 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. The latter results in build error: | scripts/dtc/yamltree.o: In function `yaml_propval_int': | yamltree.c: undefined reference to `yaml_sequence_start_event_initialize' | yamltree.c: undefined reference to `yaml_emitter_emit' | yamltree.c: undefined reference to `yaml_scalar_event_initialize' ... Use pkg-config to locate libyaml to address this scenario. Signed-off-by: Pavel Modilaynen [robh: silence stderr] Signed-off-by: Rob Herring Signed-off-by: Sasha Levin --- scripts/dtc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 82160808765c..b5a5b1c548c9 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -11,7 +11,7 @@ dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o # Source files need to get at the userspace version of libfdt_env.h to compile HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt -ifeq ($(wildcard /usr/include/yaml.h),) +ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),) ifneq ($(CHECK_DTBS),) $(error dtc needs libyaml for DT schema validation support. \ Install the necessary libyaml development package.) @@ -19,7 +19,7 @@ endif HOST_EXTRACFLAGS += -DNO_YAML else dtc-objs += yamltree.o -HOSTLDLIBS_dtc := -lyaml +HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif # Generated files need one more search path to include headers in source tree -- 2.20.1