Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7981650ybi; Thu, 6 Jun 2019 04:54:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIpzDbdAt78yUoQvjWlEOIcXn2IGa8OP1UkxV/gpznYGBcuH0/y3sDo9UzBYCJwc3LUR81 X-Received: by 2002:a17:90a:290b:: with SMTP id g11mr24811197pjd.122.1559822083636; Thu, 06 Jun 2019 04:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559822083; cv=none; d=google.com; s=arc-20160816; b=uFP8jJwS7O/2kZ6XjF0+tbKL6uihJ9SsXVvZLpDik2b5RJ1rUUzDK5WgPfOWFri9Pa nde6IF5TXAe6Qs1lXXaT47nqRVSs/Hrzsy0WrtG69PAIKLLY1EvHNB+Wgs1b+NH36iNx MbPWxYGvzPWiV1nDy7Ecg8thpoy2hbG6wgW0l3Dkhsyd8CygYBbJEd3HViSQTcrmd4k2 hmyHx/e7WQS3Ln6dTqCVRg/E6hiM5+17ALNzeN7DZmISs5cv1T846AhcVRZHQ3K+dKff STgHcGXJbYMpNEFPY1hPyMge9v+jct9P9bSz4uamlJhQjGAvm4/bvmD4v88o8HdycmWf JBzw== 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=cb02wPWOEvUQJ9uPLNeiZCEaVJfpwWS/QKktT0bb9Mw=; b=leGj4n6gPy/i0hzfQC7fp1fAfPlOhc3+PvKtT/5bfbml9VUfXeU3LRfs2wO5EzLA3h yU2kWfBywwwvGhPTyEwAMAGsbwrJEJRvTgFuLIzd8czePBgDsK4VCoAp2c2DWeTGQabZ ePr6ZT0vL4+YNOqSf/RgWXDOQ8fLkU8I6/TF0mBTXwPekfYNWWqKoMBZtSHbCmvn1xvZ eRVvyPo9jmkbvI3886MKD9kpwBsL/VX/UYpcMGiTZSkC/lrGXfPJxGr+Km0z6WuuKape DK0POz+1Qai6i1tSJOVtySbC/ZFHwzlUQUrj/xtL03S09kBFxFMNd40cnhOjkWhf/gxR 1Grg== 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 w20si1994201pgk.203.2019.06.06.04.54.26; Thu, 06 Jun 2019 04:54:43 -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 S1727529AbfFFIzy convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Jun 2019 04:55:54 -0400 Received: from mx1.emlix.com ([188.40.240.192]:35932 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727175AbfFFIzy (ORCPT ); Thu, 6 Jun 2019 04:55:54 -0400 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 A8B845FEF3; Thu, 6 Jun 2019 10:55:52 +0200 (CEST) From: Rolf Eike Beer To: David Woodhouse Cc: Linux Kernel Developers List , David Howells , keyrings@vger.kernel.org Subject: [PATCH v3] scripts: use pkg-config to locate libcrypto Date: Thu, 06 Jun 2019 10:55:52 +0200 Message-ID: <20538915.Wj2CyUsUYa@devpool35> 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 From 71e19be4247fbaa2540dfb321e2b148234680a13 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 # 4.19.x --- scripts/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) v2: add CRYPTO_LIBS and CRYPTO_CFLAGS v3: fix fallback -lcrypto diff --git a/scripts/Makefile b/scripts/Makefile index 9d442ee050bd..9489c3b550df 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.21.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