Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7733767ybc; Fri, 29 Nov 2019 00:06:17 -0800 (PST) X-Google-Smtp-Source: APXvYqx01vCZsuV4yYfvWgkmR8MvfUvDaqPoGFojSlGZjqXjRxF5LxNojcBeViw7arsb2Kp26Yjf X-Received: by 2002:a17:906:c797:: with SMTP id cw23mr58661228ejb.19.1575014777669; Fri, 29 Nov 2019 00:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575014777; cv=none; d=google.com; s=arc-20160816; b=Am5JkewBspTshTwqA1d5SpUpMrbdebzEaEMSjpOus25xL0JXVfTexPzLSOe6uuL94W IQ0vHISUGKTaEXjiWzSX3xx0TFaPj7btc8svT1QszI7f/sAjQYn8JQtMyQ/Fel1Ywf9C ghys/RzzTojP3zFqKRwntr8OKcVtZDi/VV3vt7KuXrLtmPfHCxe+Q/z77q7whNMMunGz lJCBpsemspYv2FyOfyvRL7aCSUnCSUnAbFF+8/82ymOh7ZsdeelbRP1E+MuphM00ZOMk Cb0UuYRIGOWJ71IDg7VshWcJLk6ITlocZi36MFLCXMa3voMLWAMzB97SY/0OgiC7eafI 5Y/Q== 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=BBVYTDpX6+zuo9zQD9vTD0ld5U8q7k5gMDCSpfLPxuc=; b=K+m7r96LyYOthXDDfQHGum+h74MYFZ+J43+VAxwQF9pX3zC4aJmZ+w38qPdz8LTxam Vu3j/Lp+MT6E0j6bSb+FgqLjvHO9KoAS5niWQASf6uiUnjDyATvWF3Z6uSKXkFuBudjc aLS7CTOGjMlf9BpDX5+LZMQOVofdqrAkQZKjpd92u6Ogfova58be+H77obMYUCc8Iu50 6B79U48XCXE/ae6wZLkxONs10YJatK3gtoEi0e9TxWkfOY29qp9170ztvrVxPmZREeGj YMTAvKDR+zzeCqQ/R5fHDZtdnrG/7n+UD8QjD1FFR6N/+YkTsQHj4I4G1BGWLwQDGwJI 5tFg== 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 b5si15161734edy.149.2019.11.29.00.05.39; Fri, 29 Nov 2019 00:06:17 -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; 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 S1726805AbfK2IBl convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Nov 2019 03:01:41 -0500 Received: from mx1.emlix.com ([188.40.240.192]:38192 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfK2IBl (ORCPT ); Fri, 29 Nov 2019 03:01:41 -0500 X-Greylist: delayed 304 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 Nov 2019 03:01:40 EST 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 A0895602E7; Fri, 29 Nov 2019 08:56:34 +0100 (CET) From: Rolf Eike Beer To: David Woodhouse Cc: Linux Kernel Developers List , David Howells , keyrings@vger.kernel.org Subject: [PATCH v3][RESEND #2] scripts: use pkg-config to locate libcrypto Date: Fri, 29 Nov 2019 08:56:34 +0100 Message-ID: <3291155.4g3vBG3qv5@devpool35> Organization: emlix GmbH In-Reply-To: <2010898.sAvVGPNi7W@devpool35> References: <20538915.Wj2CyUsUYa@devpool35> <2010898.sAvVGPNi7W@devpool35> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" 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 3e86b300f5a1..034789783317 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.24.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