Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp516271pxb; Wed, 27 Jan 2021 13:36:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6CSr3NCxpQ/W4kqCPfsf1JGEag3RlTyaFdmpinojypU4qgLhCiojXddvjra80rkahCXNP X-Received: by 2002:a50:f0cc:: with SMTP id a12mr11130932edm.219.1611783402970; Wed, 27 Jan 2021 13:36:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611783402; cv=none; d=google.com; s=arc-20160816; b=MCRlaZUdZ27pt2e1H8WSynMhxgdcxObFOwg1tzCRyxPbzF3ZLNBuMWDdfO7m6Yp3rn MBoyCM5erZj2rPrWyTfdOsWUAtfVZm4USG6P9uWzSoQLJXBYcNnE0AAy+UCPx7w+MZEl DP6qxuKx9RAKvutRmsmhYOcIT2mdQDgNP88nWlA1BkynPtoOdKmuFJieGnn7eJFMwQt/ JSFr3+/NSULJtnZ04iE5oDtwbcz4uuisqXodSrGSJHPqJTXQjhFRWt6TEHdoxn0n/1CV qBw7Fo/wslxlQr1IQ61UjmYEFsnZYyL7/VDZRFSSYsTIYQ8BzeyPjki7s37O6cUNk3oh yNCg== 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 :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=sSzvh7cPpQnRMAqJClQ7peYKLzKnEDTAnpn7bsRKaPQ=; b=s4FXbQGl87rmSGHVG3vD6VqCHdYi447ckYvpmjO8Y91X89thW2o6e7nlr/DGBJAkYd uxx4BlUmFl4LLULBbC+wy4VcDs2FzC6lzpETwZNwiafQt3Fe8A+2ETtAem2IMCa8VQaM +sbIsI9kTL4Ehi2xnz1Uon79rHxT03B3+6krPVbjzC88opSMOGT3DFiu5tlkdZUdxaSr 3fXBBlAEwJY+ezaaLP0jnF2lLA3inAqJsh4EJPiRep1OA41wLW9E7K54MXyCkd5moKYQ O6/rs2SsZc2+WZJAjEuj5HjzF/G1AkB2ITtjsWlKh91o9UycgagiK11laNSl25JD7gQF kcrg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb35si1318777ejc.396.2021.01.27.13.36.09; Wed, 27 Jan 2021 13:36:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234403AbhA0IFq convert rfc822-to-8bit (ORCPT + 99 others); Wed, 27 Jan 2021 03:05:46 -0500 Received: from mx1.emlix.com ([136.243.223.33]:47834 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234295AbhA0IDY (ORCPT ); Wed, 27 Jan 2021 03:03:24 -0500 Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 98AAE5FCE6; Wed, 27 Jan 2021 08:50:55 +0100 (CET) From: Rolf Eike Beer To: David Woodhouse Cc: Linux Kernel Developers List , David Howells , keyrings@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH v6] scripts: use pkg-config to locate libcrypto Date: Wed, 27 Jan 2021 08:50:55 +0100 Message-ID: <3207945.kN7qQvqmsI@devpool47> Organization: emlix GmbH In-Reply-To: <3394639.6NgGvCfkNl@devpool47> References: <20538915.Wj2CyUsUYa@devpool35> <2278760.8Yd83Mgoko@devpool35> <3394639.6NgGvCfkNl@devpool47> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From f467f251e44cd406c9556ea7d68d131f56e0d832 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Thu, 22 Nov 2018 16:40:49 +0100 Subject: [PATCH] scripts: use pkg-config to locate libcrypto 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 --- scripts/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) Changes in v6: - hardcode pkg-config 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 -- Rolf Eike Beer, emlix GmbH, http://www.emlix.com Fon +49 551 30664-0, Fax +49 551 30664-11 Gothaer Platz 3, 37083 Göttingen, Germany Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160 Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055 emlix - smart embedded open source