Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3930490pxb; Tue, 26 Jan 2021 08:11:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRAEVAdh/wElTd6OodeBK7GoVKpGB5VAtCwxFSJQkeGwHkZZV39PynKYglc9l5HMYZMBgh X-Received: by 2002:aa7:d352:: with SMTP id m18mr5246299edr.190.1611677495512; Tue, 26 Jan 2021 08:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611677495; cv=none; d=google.com; s=arc-20160816; b=op/AfTyYhVS38ymC3YXEm4Bza6cqBoPF/MWuBWIlrhT7Cquzw7tCyhPyvYZO42deEM uLDk8VLL2R0Pjn/8u9bepHFZn25e4tnzYGvCbvlYZ23svDk6lzxD5zsnFIwhQlvMjE7j tLexjCnhWXJkVzjsHIKUdiqSKif/P5t6WzgnZzyzG/yfYmToczo3TdDd3oPNEKbQjTpF 1B42uCtcBYEZcZ9oKP2g6mcJsJ6Q6irA00mDxgonDVdI6md2KSQ5hf4rbAfZld3AYLhS bLMFbZg2YEbOnTwrzx2omVFqA9PXF8fSnZMfHoi6r3dhQQvK/0IY/Mq8lCQRUMEBwbzx W/aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=Gp5wucTUhPUQty6GR8f7UIG+jue6LBq9QX+xmaU1YYU=; b=C0rsojZjXI93/kvegTK+MOVxHeeU1UDaocaRkFHumTkTGli9b9hXrmGB56SbqZhCP1 quIrA46MVWKyNfgwLTSQrImksuE8s3dNnSgKj1uPe80Th1GWHr6FSg2FvkZK7tyjQgtJ H7jNttTO9qtrhd6ZuSorrD5qD4HcV0oGMVuLOS/TvBXAqc5XCb1wsWCkAsN/WUfU7rkf lwGf3NJnuRHIADr3bR0IDFqnx6vGLjZa/v+cWR4CjvpybyBxIMrwitprrfXUkjoDhQw0 jR8GjE0FLulWBFihIG2vHo6/VptK9RLD8ZWcXEjejGF7gUChS6ZUiIybZRrFRMql0ELE +0DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=wUEyqvtz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga12si7035302ejc.703.2021.01.26.08.11.08; Tue, 26 Jan 2021 08:11:35 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=wUEyqvtz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404940AbhAZQGd (ORCPT + 99 others); Tue, 26 Jan 2021 11:06:33 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:18922 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404815AbhAZQE0 (ORCPT ); Tue, 26 Jan 2021 11:04:26 -0500 X-Greylist: delayed 34348 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 Jan 2021 11:04:13 EST Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 10QG3AXH031750; Wed, 27 Jan 2021 01:03:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 10QG3AXH031750 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1611676991; bh=Gp5wucTUhPUQty6GR8f7UIG+jue6LBq9QX+xmaU1YYU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wUEyqvtznc/E42rfaUwJXINJP5WJSl+qk7R0X36X6WPctBzw/WjYgDQrEHrHLbX75 W4IgdH0OL4C3xfXovhomSi6Xxv4Gie0wI45oPuP4IKNyzY6CRR5HSOQN2uoVurFlT4 vP+RJMvt5qtk9OTyv6ljoAU6Il4I0pIZQJTXNBjsw4P2yn8CsnPhvOBrJx2lqwOvBK 3zYYU1qeAgXKWPMGznsxAjpuq7UW5qdvEyBlFUWAv5yt5C81QJlia4DdqVuUynmWdS T1RuJalfzxEyQ5S4nHeKHnp//z++8nz9eAcA5TnzZILFNcwjxIOdxzhOSc8E240FTx rybA0TLiG/I5g== X-Nifty-SrcIP: [209.85.214.171] Received: by mail-pl1-f171.google.com with SMTP id h15so7525689pli.8; Tue, 26 Jan 2021 08:03:10 -0800 (PST) X-Gm-Message-State: AOAM530XTjR1Gpy3/VbYs1N9H+jtElzKfAgDLrDqCp6Yqw/bkEndLVAV OqcB3ukE9vpAygQPowmIoGkafyCgNRyqciqEK7A= X-Received: by 2002:a17:90a:9a84:: with SMTP id e4mr458003pjp.87.1611676989939; Tue, 26 Jan 2021 08:03:09 -0800 (PST) MIME-Version: 1.0 References: <20538915.Wj2CyUsUYa@devpool35> <2525730.a3zTd9XyL1@devpool47> <2384276.IbH9z7ADXJ@devpool47> In-Reply-To: <2384276.IbH9z7ADXJ@devpool47> From: Masahiro Yamada Date: Wed, 27 Jan 2021 01:02:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5] scripts: use pkg-config to locate libcrypto To: Rolf Eike Beer Cc: David Woodhouse , Linux Kernel Developers List , David Howells , keyrings@vger.kernel.org, Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 26, 2021 at 5:01 PM Rolf Eike Beer wrote: > > Am Dienstag, 26. Januar 2021, 07:30:03 CET schrieb Masahiro Yamada: > > On Tue, Jan 26, 2021 at 2:42 PM Rolf Eike Beer wrote: > > > Am Mittwoch, 13. Januar 2021, 13:49:12 CET schrieb Rolf Eike Beer: > > > > Otherwise build fails if the headers are not in the default locatio= n. > > > > While > > > > at it also ask pkg-config for the libs, with fallback to the existi= ng > > > > value. > > > > > > Can someone please take this through the kbuild-tree? Noone seems to = be > > > interested in picking this up so far. > > > Is 'PKG_CONFIG' necessary? > > > > I see many Makefiles hard-coding 'pkg-config'. > > Well, it depends ;) > > When people use pkgconf then this usually installs a pkg-config alias, to= o, so > that would be no problem. The problem comes when other places in the kern= el > start copying that code over, and then hardcode pkg-config for stuff that > needs a prefixed pkg-config because it is about target code. > > Given that I would prefer it this way, but YMMV. If it is that variable t= hat > blocks integrating I'll change it. > > Eike > -- > Rolf Eike Beer, emlix GmbH, http://www.emlix.com > Fon +49 551 30664-0, Fax +49 551 30664-11 > Gothaer Platz 3, 37083 G=C3=B6ttingen, Germany > Sitz der Gesellschaft: G=C3=B6ttingen, Amtsgericht G=C3=B6ttingen HR B 31= 60 > Gesch=C3=A4ftsf=C3=BChrung: Heike Jordan, Dr. Uwe Kracke =E2=80=93 Ust-Id= Nr.: DE 205 198 055 > > emlix - smart embedded open source What I understood from commit a8a5cd8b472c is the cross-compile prefix is needed only for the target CC. $(CC) -> $(CROSS_COMPILE)pkg-config (i.e. $(PKG_CONFIG)) $(HOSTCC) -> pkg-config For cross-compiling, the prefixing makes sense because $(CC) !=3D $(HOSTCC) In this case, scripts/extract-cert is a host tool compiled by $(HOSTCC), so I do not see a good reason to use $(PKG_CONFIG). If somebody copy-pastes the code without understanding it, that is their problem. Let's do proper engineering. :-) -- Best Regards Masahiro Yamada