Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1457703pxv; Fri, 2 Jul 2021 04:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ7EfHWL78k3crccRGVlRhAz2mHF6fpL+FZF0f4bluASl0zkspgg8tM96qV480F4PLywJY X-Received: by 2002:a17:907:868b:: with SMTP id qa11mr4914198ejc.338.1625225093687; Fri, 02 Jul 2021 04:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625225093; cv=none; d=google.com; s=arc-20160816; b=I/661INB9xnmfkMdohCFwJTT9utn2cHvPvJn9iuY/DnBMegjNF8YtBr4ieYk0xgpav 0AwsFY3G81Gvir8kQWlg0I+SgVXPu1BQ42K9QooPbmyBFTPpAvFCkTs5OcUBCpIcx9gB fis32W/bIDF5NSd4qOI/6Qke+2eZI/LFST2+pCK6uVVODB49JZio/+761bw/837iHqvb susvIhBnkcQZspZHzyfGui+3nYjBojPgTpnc4hwGAtFSNnE4m/KQHaJHHaPLoQbA+EcY U3/KnhyU8+r+ILhyOJ3bXs5jjgE83mH2gs7v5aGKzo/7LYDATar/rDz4etphtxnsNppQ aliA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DG3eSkF1Yde14nTW2SIrD9kY9wa3w+P0/81xapomAls=; b=a7nTr7ifYQ7xIyBd4Wvawo5UAJ2dggMviSwD3bM6sHJM/raIe/fQgARMsqtpWgf5gT mbXJ8HTacsLnTDMBOkXYdd/Nj23W6Q93unQ1QqbShhA5Qx8SBWc0JjO5Cg9pOowo7hUu 2B7MFnFKDlaKbDHD09rvs/vVz23Ky7w0l5ydXOujG/V0VAvEVCnZffRMmMLc7ptSOqR2 kGdShA4ydd3zwaR2U4jscfmS6YHbhiquufJm3iLcFaUOLGUrEXwUvupnOZpIsZn4YO/d udJMjN1tlOWePSFOCi/Mx9spWheVHQ8RcNvwU+lqM4P7sXEqbT3ZeP2sJ4W3hpKAXS2y +ySg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TGiQKFEp; 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 g20si3428412ejm.455.2021.07.02.04.24.06; Fri, 02 Jul 2021 04:24:53 -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=TGiQKFEp; 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 S231851AbhGBLYs (ORCPT + 99 others); Fri, 2 Jul 2021 07:24:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:47818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbhGBLYr (ORCPT ); Fri, 2 Jul 2021 07:24:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FDE5613F4; Fri, 2 Jul 2021 11:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625224935; bh=NAwtCL2bEeXmRZrt0BC0gPfCUoaxfOcDVf4HdonjzPY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGiQKFEpmAppwMG1AQ9lOE5jAJ3UNX1yNVdynm0Sc0CFEZX59bJdveQXQ6i+4mhcM KrPSBGgueAVmXwIVK/f3pTNzj+Xhdnt1z8dePxQsupvavSlGn6jEGjafU25A/n4dZZ oHKc17gVj+76hPCtreciV9gwWPI3qCLeYeuMdICzf407UDCw4oX/u26EEjrBtHPVeB iqvdly/7UgMbr4I9pJXAMgurt/67Ly/UP2Ww+CdAIcJG4huvHFEPHaSHMgqwGp+AbR QaGkS1W7aPWCWEobhbiyF5XleJ03SLyIe5gg5xWzs6q+frTPxEThJOcaMOjL5HUUBf zv95HkMfoqXNg== Date: Fri, 2 Jul 2021 12:22:10 +0100 From: Will Deacon To: Nick Desaulniers Cc: Catalin Marinas , Masahiro Yamada , Arnd Bergmann , Fangrui Song , Nathan Chancellor , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] arm64: drop CROSS_COMPILE for LLVM=1 LLVM_IAS=1 Message-ID: <20210702112210.GA11084@willie-the-truck> References: <20210701235505.1792711-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210701235505.1792711-1-ndesaulniers@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 01, 2021 at 04:55:05PM -0700, Nick Desaulniers wrote: > We get constant feedback that the command line invocation of make is too > long. CROSS_COMPILE is helpful when a toolchain has a prefix of the > target triple, or is an absolute path outside of $PATH, but it's mostly > redundant for a given ARCH. > > If CROSS_COMPILE is not set, simply set --target=aarch64-linux for > CLANG_FLAGS, KBUILD_CFLAGS, and KBUILD_AFLAGS. > > Previously, we'd cross compile via: > $ ARCH=arm64 CROSS_COMPILE=aarch64-linxu-gnu make LLVM=1 LLVM_IAS=1 > Now: > $ ARCH=arm64 make LLVM=1 LLVM_IAS=1 > > We can drop gnu from the triple, but dropping linux from the triple > produces different .config files for the above invocations for the > defconfig target. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1399 > Suggested-by: Arnd Bergmann > Suggested-by: Fangrui Song > Signed-off-by: Nick Desaulniers > --- > arch/arm64/Makefile | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile > index 7bc37d0a1b68..016873fddcc3 100644 > --- a/arch/arm64/Makefile > +++ b/arch/arm64/Makefile > @@ -34,6 +34,17 @@ $(warning LSE atomics not supported by binutils) > endif > endif > > +ifneq ($(LLVM),) > +ifneq ($(LLVM_IAS),) > +ifeq ($(CROSS_COMPILE),) > +CLANG_TARGET :=--target=aarch64-linux > +CLANG_FLAGS += $(CLANG_TARGET) > +KBUILD_CFLAGS += $(CLANG_TARGET) > +KBUILD_AFLAGS += $(CLANG_TARGET) Do we need to do anything extra for the linker here? I can't see how we avoid picking up the host copy. > +endif > +endif > +endif Have you tested the compat vDSO with this change? I think we'll just end up passing two --target options, which is hopefully ok, but thought I'd better check. Will