Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6118617pxb; Tue, 16 Feb 2021 17:10:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2wm4059yY1bbYmjoY7B5bAEgonBsAeAi2xwoREcck4NFZ2zBC4Ycbh1v+JhJPzp49u9Np X-Received: by 2002:a17:906:5855:: with SMTP id h21mr6445778ejs.552.1613524238518; Tue, 16 Feb 2021 17:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613524238; cv=none; d=google.com; s=arc-20160816; b=cYIv8LXwoskNGoagCvi8odNcwwCtswWgyoeFcutaZ7bVU08FTzae1u96SstF0kOs5n mdUtHBNwCKNAHPUvbhXDPxCsZz05G0SMl1nIYmgJH51xy6t4PZXZqAN9udTUp8wBEXZ7 Obzb1nwz7nygi5vcCImdAVwyIB2ggt1KL36W6aolJfj8Qvt4qXXYGM80Wox5HeMD8OMP r+QVfIC38lhywh+Vyv548mtP8rdwfP86U3S3OYUTCMW6f7xRC06dgHaxb5FVXofR2VbZ 1UsqIJGDGlumPJJJR0jMfsi6WwmrNPnhiSUiAzcmjGW6ZXuOq3FJqlroSoH7FTwMGmCp WEuQ== 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; bh=Iq1gkpVHEz387Gom/8X56uBSKGCqa4TA+SA+jctV79s=; b=hn6nFG4SIPTgnIfngqekzqxOQUoFu0Riu8gHdpHR1eY6DoOoHtv2wU7BUwySKVuOYT Lpi009c8CW8wGZbKspS7NvM53MvY1niBLZhvBkXlgZKgNjPzrzJdkraAymb/DZe1R0mI yKhrtDwNRbMhoVmLM37RNNxsSyNlk8ryDiFZNmTctmTMd8KX6z9v7hwgHFBQPJXfR2S1 lXcpp/r8Tv6QyszidvmeO7SqCj9K79Ds4ZIFRt33DFkE5f/z3PHk/aAucOgM0GUVuRqN E6xfNZK2iN394iq9ujWsZTeHodVjVylr2bGFpHIinv7up0rN0JkKuxjf5DH+TJWqSDOG MLlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r5YC3E3s; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si199797edd.560.2021.02.16.17.10.13; Tue, 16 Feb 2021 17:10:38 -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=@linaro.org header.s=google header.b=r5YC3E3s; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbhBPXw3 (ORCPT + 99 others); Tue, 16 Feb 2021 18:52:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbhBPXw2 (ORCPT ); Tue, 16 Feb 2021 18:52:28 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9622BC06174A for ; Tue, 16 Feb 2021 15:51:48 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id s6so2878493otk.4 for ; Tue, 16 Feb 2021 15:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Iq1gkpVHEz387Gom/8X56uBSKGCqa4TA+SA+jctV79s=; b=r5YC3E3sRUKcFQ1s5h6Gjsz/denswBuwn1idqOnNTpH8a757IuRghBvh8WDPYmdqz8 MBhxBLs7u9YJ8PcUAQ4qfPB8QrCX1C1CB3rKqnxTS5tb5Lwu039e7J0I/tL3ft/I38Hd JZ9V669kezEqkMqbmyqtC0cYaWeFDaq1STSsuSawsjgAhYCAd2ldn8/PqAB6lXLxZjLb llQEBlRaGrxGWQepaeAJj5WpB3pS25YuSVOwdD5LyXTCHbYp1oaRTInXtkfKA0cb+cRv DoktPEUXm0A+NN7NLjsZS25t/qB4+bASp0Vbak3fFNhXdiViRk88v6EeKMHp7Tkz8jTp r21Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Iq1gkpVHEz387Gom/8X56uBSKGCqa4TA+SA+jctV79s=; b=ng88Pf4oY52pQeWTg9TniR3fUIoV0VoUczN/jzdxvR+FiZg4ZPM2bLHdSa2gqEChW9 XUVjYIFk6G1R4i86olpYLSgGK7yDfyu6HzAqj3f+jB4eySvlU59a+7NT36EafUtO9wmM SqteUAhpi6cgIyJlve0ZWTKrUZvDbHLb+dVQDDaRutCFCtoRvBaN30kcIrlZE/m29zHu ee2mCRFS5xlsoBJpTpMIYUJ4pTPLSAYuyIua8vtBX0vfGHr0GhDB9VlpmPP0S9jNdNTp 1kSM+TGk3Uza7hSReqT3W9sWdrqAxLk6Nl9iovTx+p+MeeKfxl8LQTR9puJMZIv0SPVi 6/Xg== X-Gm-Message-State: AOAM532fecVOHSyvnBxqtNTYFWQrl0hICdsrZDai0xsRSH9taTTIlpMf T1ikgOxpPUTyux4GKHNK44fyo9gmwKt7qkfBSvZvJg== X-Received: by 2002:a9d:6756:: with SMTP id w22mr13978900otm.50.1613519508054; Tue, 16 Feb 2021 15:51:48 -0800 (PST) MIME-Version: 1.0 References: <20210209050047.1958473-1-daniel.diaz@linaro.org> In-Reply-To: From: =?UTF-8?B?RGFuaWVsIETDrWF6?= Date: Tue, 16 Feb 2021 17:51:36 -0600 Message-ID: Subject: Re: [PATCH] scripts: Fix linking extract-cert against libcrypto To: Masahiro Yamada Cc: Michal Marek , Rolf Eike Beer , Linux Kbuild mailing list , open list , stable , Naresh Kamboju Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! Apologies for the delay -- Currently experiencing power/connectivity issues= . On Thu, 11 Feb 2021 at 01:12, Masahiro Yamada wrote: > I am wondering how "HOSTLDFLAGS_sign-file" and > "HOSTLDFLAGS_extract-cert" worked for you. > Kbuild supports HOSTLDLIBS_ syntax, > but not HOSTLDFLAGS_. Thanks for the insight! The pointer you have provided are very valuable to try to fix our problem. What effectively happened was that LDFLAGS was removed, and therefore the gcc line did not include one -L path that's proving difficult to use under OpenEmbedded cross-compilations. This discussion has provided much light in areas that are unknown to me, but so far it looks like the fix will need to happen in the OE recipe and not in the kernel itself. Thanks and greetings! Daniel D=C3=ADaz daniel.diaz@linaro.org > I see $(HOSTLDLIBS_$(target-stem) in scripts/Makefile.host > but failed to find $(HOSTLDFLAGS_$(target-stem)). > > So, presumably you will get the same result > (OE build error will be fixed) > even without HOSTLDFLAGS_sign-file > or HOSTLDFLAGS_extract-cert. > > > > But, I am still wondering what the correct approach is. > > > > Basically, there are two ways to link libraries > in non-standard paths. > > > > [1] Give linker flags via HOSTLDFLAGS > > This is documented in Documentation/kbuild/kbuild.rst > > HOSTLDFLAGS > ----------- > Additional flags to be passed when linking host programs. > > > > > [2] Use pkg-config > > > > > > > OE already adopted [1]. > > I think the following long lines came from HOSTLDFLAGS. > > -isystem/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r= 0/recipe-sysroot-native/usr/include > \ > -O2 -pipe -L/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d= 83-r0/recipe-sysroot-native/usr/lib > \ > -L/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/reci= pe-sysroot-native/lib > \ > -Wl,-rpath-link,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f= 250d83-r0/recipe-sysroot-native/usr/lib > \ > -Wl,-rpath-link,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f= 250d83-r0/recipe-sysroot-native/lib > \ > -Wl,-rpath,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d8= 3-r0/recipe-sysroot-native/usr/lib > \ > -Wl,-rpath,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d8= 3-r0/recipe-sysroot-native/lib > \ > -Wl,-O1 -I/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83= -r0/recipe-sysroot-native/usr/include > \ > -I ./scripts -o scripts/extract-cert \ > > > > > But, some people are not satisfied with [1] (or do not notice it)? > > > Then, 2cea4a7a1885 introduced the second one [2]. > > Mixing [1] and [2] perhaps confuses the build system somehow? > > > > > So, 2cea4a7a1885 was a problem, but > I do not think this patch is the right one either. > > (At least, HOSTLDFLAGS_* additions are pointless) > > > > > -- > Best Regards > Masahiro Yamada