Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2882072imu; Fri, 23 Nov 2018 16:38:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/VvN/rBJySwcwCysuKtoGHz74CzEC4t2hIUR7TQUgMeJbKR1plFZEQ9/L9DdUdh9LqQDGUN X-Received: by 2002:a17:902:102b:: with SMTP id b40-v6mr18145565pla.319.1543019887713; Fri, 23 Nov 2018 16:38:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543019887; cv=none; d=google.com; s=arc-20160816; b=ZfLBdbqchWQuhW5rPqm6X67y7WMJrDaQLkac9b3KLtqT89GXreVmuHfAa27OZ30OAc mL1eWWQHPg8O7a4K4C0M1NB79wg3AMs4tUTIOSE7iS1d6JioLsgwPSHnt/697dzkYcKx RMU7faq+KD25VSksjNooPeOLIOWxKevHEZR4KPBLhY+jLtJ4pHqDmguYXyV+f874Hw5H YmWjOCJ8QcNToivJVOMFnUZYMtm9INxHod4cSI3fTiTrB5DIPvrEnRQerogWV4riifIF LO2yd2DgyZqWtDrr5InQnMO08jdDZW3Fnzy/MSaSQBkn47XQYiryTClFz+bKX3bJ3GHQ jo2Q== 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 :organization:message-id:date:subject:cc:to:from; bh=7dFo6PrDH10YWdo/tsZfT9iTGygf5E3AY7B+XnhPzlE=; b=Y3Y3ZjscadrcK7smG4K667IX1/nchVKGFsyuOyj4b9KYfLOgRUJvhR7CrZLEK6LxSx wsgpcqDE+6Zqcwms4LYn/d/RcvVvH1KkNqvJuLlZjGUr1/FdLG58Dp8Ho5b2+rEmF5x9 qIqrtmvrGET2v60PzpitVSJPC2v3hflKHPSP57eW+nLZO/pTk38Z9Iqop1KjFzmaev3s CuBdWXKNBhas3OraMXLgrdUaWakQZ0r4+B6WSqntIHgv0I5k6hh7ANZ9WBx26F0fi01G WCqTrBVX3piEq7s7buUHDNv8ZxDx1K5rsVTJ1i6VMOzxJRrOz/Sm5z5xW8/KMD6PBIgG aWgQ== 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 z15si15922481pgi.304.2018.11.23.16.37.52; Fri, 23 Nov 2018 16:38:07 -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 S2437891AbeKWCb3 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 22 Nov 2018 21:31:29 -0500 Received: from mx1.emlix.com ([46.4.235.150]:43380 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729559AbeKWCb2 (ORCPT ); Thu, 22 Nov 2018 21:31:28 -0500 X-Greylist: delayed 383 seconds by postgrey-1.27 at vger.kernel.org; Thu, 22 Nov 2018 21:31:27 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 29F3725F628; Thu, 22 Nov 2018 16:45:10 +0100 (CET) From: Rolf Eike Beer To: Linux Kernel Developers List Cc: David Howells , David Woodhouse , keyrings@vger.kernel.org Subject: [PATCH] scripts: use pkg-config to locate libcrypto Date: Thu, 22 Nov 2018 16:45:09 +0100 Message-ID: <3861016.XCek94Sdvs@devpool21> Organization: emlix GmbH 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile b/scripts/Makefile index ece52ff20171..a303f478a65b 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -8,6 +8,8 @@ # conmakehash: Create chartable # conmakehash: Create arrays for initializing the kernel console tables +PKG_CONFIG?= pkg-config + HOST_EXTRACFLAGS += -I$(srctree)/tools/include hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c @@ -23,8 +25,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 = $(shell $(PKG_CONFIG) --libs libcrypto 2> /dev/null || -lcrypto) +HOSTCFLAGS_extract-cert.o = $(shell $(PKG_CONFIG) --cflags libcrypto 2> /dev/null) +HOSTLDLIBS_extract-cert = $(shell $(PKG_CONFIG) --libs libcrypto 2> /dev/null || -lcrypto) always := $(hostprogs-y) $(hostprogs-m) -- 2.19.1 -- 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