Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5457149ybe; Tue, 10 Sep 2019 04:06:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEVw1duFx6tCGh4tRXbSGApdZQGU/sAPAHSr2p+8VbyRAzpthleoT8Z8q1ep1AYhqtoBeR X-Received: by 2002:a50:a4aa:: with SMTP id w39mr14338752edb.72.1568113616718; Tue, 10 Sep 2019 04:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568113616; cv=none; d=google.com; s=arc-20160816; b=UdtdCGMQU+N4DYrxEX7KvaeJhy67mLOHZmpWfNIw7dvO6bzzC4K0DMeJBSfQher/0r antOiLz3dThOWhRcuX0bC0CWPEaQ6R6WSVr8nl9p+m4OjmxefzdsQjFCXbPmLrNt2/Gm 72PlUzuA3/frs3kmqQcHlGfi6l6Klmpz9i2A3JTzl86V2ufb1wF3LqIIu2vjz72xbYVb K4GqG7en0En0WgbSwGp2O5qTB9vNcawpuH8PJ8O+J/BRtOx8rblrcC2tYod8zvnAv0Lw yh+ORFbhrUHWqyPvxdAn130J8AT6sBAzTOFvekaJ1wc95c78otCBFZOiU7tKM4DIakeq yV9A== 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 :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=wdflUN7naf47sMOBIvPMT7RQQRa9TE9PphR70de4otg=; b=Hn8J56gnVgoYOlmpDSXMstX0m5FY7CzcveWbpNsGLg4Ml0b9RL89MwwZRXoZXQfJzK r4jEbPslJLAXWcvP6kkXI8q8lDdR/zsdTSKh4ll6GnMGcBbfOofngV2krCNWd4obqEUh dgBPgydySbrGbf7l8PSZvB/LKab04wEUT6ANnoGtWbumdQpqsMR+fDU9iqe9ClkpEOkF p8QKPzG27GLeKHJ+RHDGGjslk6Mo4mOYFucXSQj6DhiLFPaJnapF39ubekEHDXPn39+X RjrqHyqrPbhukVHHLCj0GBCDVpjooc3rvq1oF0dNHenZFCqIibqD/1+Ng7AL8XwjoaDs MRvw== ARC-Authentication-Results: i=1; mx.google.com; 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 k1si10329545ede.255.2019.09.10.04.06.32; Tue, 10 Sep 2019 04:06:56 -0700 (PDT) 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; 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 S2404646AbfIJGuh (ORCPT + 99 others); Tue, 10 Sep 2019 02:50:37 -0400 Received: from mx1.emlix.com ([188.40.240.192]:33030 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbfIJGuh (ORCPT ); Tue, 10 Sep 2019 02:50:37 -0400 X-Greylist: delayed 573 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Sep 2019 02:50:36 EDT Received: from mailer.emlix.com (unknown [81.20.119.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id B189A5F8BE; Tue, 10 Sep 2019 08:41:01 +0200 (CEST) From: Rolf Eike Beer To: David Woodhouse Cc: Linux Kernel Developers List , David Howells , keyrings@vger.kernel.org Subject: [PATCH v3][RESEND] scripts: use pkg-config to locate libcrypto Date: Tue, 10 Sep 2019 08:41:01 +0200 Message-ID: <2010898.sAvVGPNi7W@devpool35> Organization: emlix GmbH In-Reply-To: <20538915.Wj2CyUsUYa@devpool35> References: <20538915.Wj2CyUsUYa@devpool35> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- scripts/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile b/scripts/Makefile index 16bcb8087899..1715adcd8f81 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -8,7 +8,11 @@ # conmakehash: Create chartable # conmakehash: Create arrays for initializing the kernel console tables +PKG_CONFIG?= pkg-config + 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 @@ -23,8 +27,9 @@ hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert 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) -- 2.23.0