Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4173851pxb; Mon, 8 Feb 2021 09:36:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxuGDcqTsJzRepS50Q+j8NEndJVCPk/oxsIjfq9r+JPfT14HoyTMGtH/tLh4mGKv90d0fA X-Received: by 2002:aa7:dcc6:: with SMTP id w6mr10646115edu.19.1612805767273; Mon, 08 Feb 2021 09:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612805767; cv=none; d=google.com; s=arc-20160816; b=Wi7HRJUxqatw7d4NLQTtr1TmzA2dAE4uYQ49827997c1EvM+svci8xaNNQwFaB1S/+ CkMtCV7ZEK92aQ4I6C+lyoPWx53Uj6YeB6EMYvE3pWodjQ28mr7OvVQHy6dgNU8CCEJn irNNuRXtXlW+ZKMqgWPeF9ZGEbJAZzFw9bTLMd0STYjjj7wKBGi/MasH6ekoliUlYn8c LTEIXt0wGc93LPs7ARxI9I42qcq6VG3zPJdpVdqFUyoSh1wg2qiAn5+/8SpgOwlTXs9o HSz2ps6IZyeSvIpFkLUF1fCdWuO070BPTsRSa5z6peRGgTt13wsr1EuwFIpht2t1nzbx D77g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zVD3B/deqFZ6UAbXifkSfu7HqlAbXbF8oVT+e36IZG8=; b=fBbk/Ph2FaiyVnQnrq0j39OwAEB6QaSslbRTpt/J2L4HGUnQrqqylgMC+RVgdIgqVU b1MC81+0tj2Cx8r9W/50fILv8bjI5RC+KhNMn3sIWtUdwCR+4kEzUdOY9KNnBrD3YXbg 2ZolgKdP+nSw53Wx+4xoD02ORaBSv8vr17KVGnslpLRFv44J4/YvN/rNEQorJclNFUuI /z6a+xpqiU9vhO/KO3dsg904Y5WRMlM+0mBw0xRv1sPIBwknr3ZJWGQQD+sJqpRj9i4V tyZjLFo/YHCKqMasLCujOhjqF/C4LlsTmmqX10smolpV7X6RLHwl0FlNPyMpdfrJySF6 aAxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OgW5VtYh; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si11626106eja.539.2021.02.08.09.35.42; Mon, 08 Feb 2021 09:36:07 -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=@linuxfoundation.org header.s=korg header.b=OgW5VtYh; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234983AbhBHRcy (ORCPT + 99 others); Mon, 8 Feb 2021 12:32:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:36948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbhBHP3W (ORCPT ); Mon, 8 Feb 2021 10:29:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F67864E7B; Mon, 8 Feb 2021 15:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797411; bh=bKf7T6mmPxUfY1fC+UjC4N3ca6t+7g/1b14q9UtgwOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OgW5VtYhrHW8o/9A/wWN6SraJEvU7RsLANtf6LuPwaqxUuKQDHgndrAF+pXMgU4X+ enqSe0RoWVzEwE7QcYIhMFwgPlN1TMwIUqaMAezuRjlmNkAicGT2xV+w7wiZlHEzTS kiPyaoZdGKZun/bMXGAV9u/5x3gXxl6SdUvlvNH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rolf Eike Beer , Masahiro Yamada Subject: [PATCH 5.10 068/120] scripts: use pkg-config to locate libcrypto Date: Mon, 8 Feb 2021 16:00:55 +0100 Message-Id: <20210208145821.125748275@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rolf Eike Beer commit 2cea4a7a1885bd0c765089afc14f7ff0eb77864e upstream. Otherwise build fails if the headers are not in the default location. While at it also ask pkg-config for the libs, with fallback to the existing value. Signed-off-by: Rolf Eike Beer Cc: stable@vger.kernel.org # 5.6.x Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- scripts/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile b/scripts/Makefile index b5418ec587fb..9de3c03b94aa 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -3,6 +3,9 @@ # scripts contains sources for various helper programs used throughout # the kernel for the build process. +CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) +CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null) + hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount @@ -14,8 +17,9 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include -HOSTLDLIBS_sign-file = -lcrypto -HOSTLDLIBS_extract-cert = -lcrypto +HOSTLDLIBS_sign-file = $(CRYPTO_LIBS) +HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS) +HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS) ifdef CONFIG_UNWINDER_ORC ifeq ($(ARCH),x86_64) -- 2.30.0