Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5552234pxj; Wed, 26 May 2021 13:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHuC01wg04C5bPk2oyr5cu3dsW9dM+4NGjVAOTsALyvxbL9MyvUjk0GwJMWomoln5o9Tbe X-Received: by 2002:a17:906:9bd6:: with SMTP id de22mr111197ejc.382.1622060566182; Wed, 26 May 2021 13:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622060566; cv=none; d=google.com; s=arc-20160816; b=i0r2zzU26w5mirALr5D3psRK1szCQi+2XMqSVnUW1DNsOYwyP3Tu6un/e6RXK6bX/a /TozMgyu3x6N2N+Iektz/+HSQCeAfN+UkDmiwqM7zpaxX/5E+QjRy8rbmR2h4YY2V1i4 MfHBlvVEWQiH1zXDTVAYlCLfF6MkHal/qTq2N1MX8uUvAg8fLG9KJ3tH0YXZOpuJc4Xr mn3G39wOAjcQXlCsTcvv79vYFWD0tOF8nBAAio6E8uFZIZ3XWMLHMzTYzrOs4DKuoUSG LfhOGXaCyWTqvm2ZYbR1+mT0jG++VPSYzvO0KXjK/M28bSbylVgA+mGyb4KADcbG9SJQ UBoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LM81c8WDi5BwmLouyZ8zF9fv05pUHOrCdFbQLL111/U=; b=NTK/ucFmUo2Q6qCfLnZ96uLQeSxPNkwE4irUwiPY63PSEgqgvdXz1Yji/cOT4tfD1v PKMkUT/m0AGePVBcr/OQpKAjvdpyC95sVDeIQYyuf4HCFZfb4xYEEnyOodA2LWzqzWU8 nZsw5c8Xhwv6mLrdecwZxSjYsX/OJt3Yq/FRHYmhv0fn/VDjmP2ysFfV6VXPHvARt9ub 3NToxJOmxf1VlyE4fVoYM/rGNaWmVA2E/Y4qWkXuhz9fMYlhLIlaQg45/+DLNMfGHFJy qM7fZgbJDLntcWORZoEbQT5TRYGskzQf54n+gcT/BNc1fyegz/BRPGF9ob/8P9iv/jW8 9WuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Vxk/fz3Q"; 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 f25si110297ejh.388.2021.05.26.13.22.22; Wed, 26 May 2021 13:22:46 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="Vxk/fz3Q"; 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 S234953AbhEZTAs (ORCPT + 99 others); Wed, 26 May 2021 15:00:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:40114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbhEZTAr (ORCPT ); Wed, 26 May 2021 15:00:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA0A0613C7; Wed, 26 May 2021 18:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622055555; bh=WGltjEQGQmSpa0KZNMruhrwEKLk8ypzCyKbofsPqxgo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vxk/fz3Qe8ijcHZhGycuv13zj2Tf2nadeqXGtW5NLCvKPewj7F/Di3JcXN8IQlpco fVmmg0sPOgXMDVs+2xEMDJpPDT+gDZzw34FJ2eiusEpmGOOxLp8tWqirTkmyaObqON xxhraziuBhEoHX6whg47zCH2CwBBBkiRoENq4U9C2cvYbmq3bK7yDjWq6304dB96Io 5fGSeIuH6Gpptu+yVcXb+IuL1zjVcEH3rXHNkxDnkn4J8gwSLFCcN4sNNjFaRtWzFL //EJLmkm1/M6bM0twIB1zyv7agPKsNBw2edeC+yhEorOFYw7Mi1/fs/vj9RcyDYvG/ uYwEPuxK8ImRw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 76BE14011C; Wed, 26 May 2021 15:59:10 -0300 (-03) Date: Wed, 26 May 2021 15:59:10 -0300 From: Arnaldo Carvalho de Melo To: Andrii Nakryiko Cc: Javier Martinez Canillas , open list , Alexei Starovoitov , Andrii Nakryiko , Masahiro Yamada , Michal Marek , Linux Kbuild mailing list Subject: Re: [PATCH] kbuild: quote OBJCOPY var to avoid a pahole call break the build Message-ID: References: <20210518142302.1046718-1-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, May 26, 2021 at 09:18:27AM -0700, Andrii Nakryiko escreveu: > On Tue, May 18, 2021 at 7:23 AM Javier Martinez Canillas > wrote: > > > > The ccache tool can be used to speed up cross-compilation, by calling the > > compiler and binutils through ccache. For example, following should work: > > > > $ export ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" > > > > $ make M=drivers/gpu/drm/rockchip/ > > > > but pahole fails to extract the BTF info from DWARF, breaking the build: > > > > CC [M] drivers/gpu/drm/rockchip//rockchipdrm.mod.o > > LD [M] drivers/gpu/drm/rockchip//rockchipdrm.ko > > BTF [M] drivers/gpu/drm/rockchip//rockchipdrm.ko > > aarch64-linux-gnu-objcopy: invalid option -- 'J' > > Usage: aarch64-linux-gnu-objcopy [option(s)] in-file [out-file] > > Copies a binary file, possibly transforming it in the process > > ... > > make[1]: *** [scripts/Makefile.modpost:156: __modpost] Error 2 > > make: *** [Makefile:1866: modules] Error 2 > > > > this fails because OBJCOPY is set to "ccache aarch64-linux-gnu-copy" and > > later pahole is executed with the following command line: > > > > LLVM_OBJCOPY=$(OBJCOPY) $(PAHOLE) -J --btf_base vmlinux $@ > > > > which gets expanded to: > > > > LLVM_OBJCOPY=ccache aarch64-linux-gnu-objcopy pahole -J ... > > > > instead of: > > > > LLVM_OBJCOPY="ccache aarch64-linux-gnu-objcopy" pahole -J ... > > > > Fixes: 5f9ae91f7c0 ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") > > Signed-off-by: Javier Martinez Canillas > > --- > > > > LGTM. Masahiro, would you like us to take this through bpf tree or > you'll apply this to kbuild one? > > Acked-by: Andrii Nakryiko LGTM Acked-by: Arnaldo Carvalho de Melo - Arnaldo > > scripts/Makefile.modfinal | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal > > index dd87cea9fba..a7883e45529 100644 > > --- a/scripts/Makefile.modfinal > > +++ b/scripts/Makefile.modfinal > > @@ -59,7 +59,7 @@ quiet_cmd_ld_ko_o = LD [M] $@ > > quiet_cmd_btf_ko = BTF [M] $@ > > cmd_btf_ko = \ > > if [ -f vmlinux ]; then \ > > - LLVM_OBJCOPY=$(OBJCOPY) $(PAHOLE) -J --btf_base vmlinux $@; \ > > + LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J --btf_base vmlinux $@; \ > > else \ > > printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \ > > fi; > > -- > > 2.31.1 > > -- - Arnaldo