Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3514102pxb; Mon, 1 Mar 2021 11:59:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbxZ+dZZBJNlwrNEoeiMhK+MkOuydtVR6c9nHzH7edKe+8RnEfY2ZsxMmAIMOr/lW9wJ8+ X-Received: by 2002:a17:906:79c7:: with SMTP id m7mr2069069ejo.337.1614628793424; Mon, 01 Mar 2021 11:59:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614628793; cv=none; d=google.com; s=arc-20160816; b=BSFtXCcO4XrIJDt6LATR0SQVJZmcNG2q5U39CwO642QxfMhsGJlU2ya7/08L869pfD zG/uWhB7VAKkCMqyZkDTrvS6qqG8YXd29bPdgFMF8gJLFV2wxtHkfSm1MXoe85oVmRAb KoXgebDAWzIKn3+ArPmw2rG9gpuvvANeo284xnQod0ph9Ji/CHLkrBIXkKK1wudKXMmn rqXfcXKiSum4EZKR/T2lbCfANnK2C8KlNMWBwEXxYHMqFmTPyQ8z+c+bbcwDBkOcGaDp YmRvUsKP9DQQ/X3s5HHMKGMQ/a+nxPiVYS/gSQFq9U4tNkWs4QCy+6iAOQf0m92Ik8gN QpEQ== 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=kKEWknFizfdTvP6/imc/+ZbhY58eW56Y+7o39JKdtOI=; b=UxvI4UcwnVIiOs9i9hSciBT/obRK7f423LjMW98dIhLWmzXG0d2YaO697T6j1NP6zm V7B4aXEd/SKZI4zOb/URH6QdLGagIdERgiSctuiM16/nfu5ySzRD0KvsPtpN2+1Brw26 MKBBKTTnkralge6SCNMbjyQSEEfB5y5cOV5pj6vUe8lcSIMpe4hZC/7WI32ysUVxmN9a NeCzyr4Y4/PmT0/+PvwaVdoZbuy/YklBlK8qheSEQyEGqM7tPolPGMpa/e6n243r0JHw PIS7f5zGVRBK7hhqDHt0jHj2iz/TQCEu4uZJzPO0d8yrvlwssGaRYGY+HB1AzXBGb8wc AMNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xdrFhcRh; 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 jt19si11559973ejb.589.2021.03.01.11.59.30; Mon, 01 Mar 2021 11:59:53 -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=xdrFhcRh; 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 S242430AbhCAT6F (ORCPT + 99 others); Mon, 1 Mar 2021 14:58:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:59152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236153AbhCAQ6K (ORCPT ); Mon, 1 Mar 2021 11:58:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46FEF64F5B; Mon, 1 Mar 2021 16:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616591; bh=FOYkBGeqyDEKd26/v0UlNBNy5fH1sisv9RVQ0kgNT1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xdrFhcRhc4GHRJEvYliHGbQoS6vFGTN/7Is6m1rajmW0JQJRctTQl1za8CzXUnoY/ SFEb//nY7VAmu7wCg5QzlRGZlpakbyGGBkQnkuK6QFbZizzJoTmK4WqbNTbnqv0+s9 Qtg6CnoXo19Lov/Ac3kLBEPTeRs/8V9Nfnl7CSQw= 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 4.19 006/247] scripts: use pkg-config to locate libcrypto Date: Mon, 1 Mar 2021 17:10:26 +0100 Message-Id: <20210301161032.008526301@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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(-) --- a/scripts/Makefile +++ b/scripts/Makefile @@ -10,6 +10,9 @@ HOST_EXTRACFLAGS += -I$(srctree)/tools/include +CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) +CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null) + hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c hostprogs-$(CONFIG_KALLSYMS) += kallsyms hostprogs-$(CONFIG_LOGO) += pnmtologo @@ -23,8 +26,9 @@ hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFIC HOSTCFLAGS_sortextable.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) always := $(hostprogs-y) $(hostprogs-m)