Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1630064pxb; Thu, 28 Oct 2021 07:16:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWI5OuSBaSYe6WAAfaxkIyB1ZkJdrqtuOxWGsdIMvTpODNMqmmVkc7G+ENXrwInimGaWuz X-Received: by 2002:a17:902:d88c:b0:13f:f584:f630 with SMTP id b12-20020a170902d88c00b0013ff584f630mr4041376plz.58.1635430595572; Thu, 28 Oct 2021 07:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635430595; cv=none; d=google.com; s=arc-20160816; b=e4s5zxrk5dR53BIj7GeHAL8HCwvw3CyiGjhG73lFvKfXygqEJoL2t35uugIif2NO6A qWYTt5ijzYY7PRnNp3Kf6PSy4QCYrO2PrixW0muJUSCChR0HQMFSwuzWFclWf2s/gLZy 5LdSXeXXOpWy3dqSq1FZ16DUnUwI+/hqYTsCSV4EG8/wzK3poeNMKn33qNQsejDMINDz yCSJpde1J2fxRoTuDLF440WKIlfpJRLuChoJvU3GpC30MS466VdcPaevBbHDIYJZya90 6IcsEQ4wLOaxqhnDFkIwBCVt8GhFfj8gTbEiUzpT/ch1uruXFIDDuhvM2vqJ/OZlhigT BGFQ== 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=bc40OkCZc3qUDZQjfILbCSwNeOqpl7xu1nq2tjombnE=; b=DBG5jW4lE8Gmft4DJrVJr9N1ijtElqDH3PzZ8HH6p3Olqqsxj0wjEVdvo/sM1rJ409 pIdTyIEu3wQVHADq4HQmYsHgtc7MCaYWQa/ANjLNonPgwP/hooQxkPBMGXcSsO+6usCN Blaal9vxYo8MkMhyJXjVwFo+B3wfZfpOfANTm7E0v3PnaYxpjcqj1RarEC8ZHVMdrWH8 yNk/VXXd3DXfEpjO5yJbKPK4eg0zD9caPin3KxnDnLxjNTsRz23uxqcMAX4/KAY1qJtY p+MwR23RasTo3LeUkWymLUOLJ3YP9yPeiTVCOglvyWY+r/fNM7ZODI3Gb2ZJjgrxyVIF h/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="OasiJD/T"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4773930plf.116.2021.10.28.07.16.22; Thu, 28 Oct 2021 07:16:35 -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=@infradead.org header.s=desiato.20200630 header.b="OasiJD/T"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231166AbhJ1ORt (ORCPT + 99 others); Thu, 28 Oct 2021 10:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbhJ1ORp (ORCPT ); Thu, 28 Oct 2021 10:17:45 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EEBCC061570; Thu, 28 Oct 2021 07:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bc40OkCZc3qUDZQjfILbCSwNeOqpl7xu1nq2tjombnE=; b=OasiJD/TSM+8sTYgzQS3HNGf4Y BPt+VlI7/h1xQuXFHQoMlWvk02dD1LnN72xe2sehiX6aJSttPoR0pnL6g27KAIICkpTmfoecce/uO hOas2Wb6v1iiZWcMhIa4Vb04tNAwkjPjse2/GkpP4JpGAAcxS1BGhC8NAfzECJejIOXoSXwqNXLqV 4bYu2Ce5FADs4o3oDPLN4DmJnxAlEUc3N1pffjh/9PWCALKgKdhJN23s5Vved+cYoIH5wBPRUlOpm sQd1894HT9r6V0M8HM3AXalADo3rr6SPuflGYwjBAckY7/i0rRs9WP1ggWynGcW+Da3kpxeEsUBzY +e/K0VFA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg6BL-00Cofl-JY; Thu, 28 Oct 2021 14:15:03 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 87C0E30022C; Thu, 28 Oct 2021 16:15:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6ABB32C41F782; Thu, 28 Oct 2021 16:15:02 +0200 (CEST) Date: Thu, 28 Oct 2021 16:15:02 +0200 From: Peter Zijlstra To: Masahiro Yamada Cc: Nathan Chancellor , Nick Desaulniers , Michal Marek , X86 ML , Linux Kernel Mailing List , Linux Kbuild mailing list , llvm@lists.linux.dev Subject: Re: [PATCH] kbuild: Support clang-$ver builds Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 28, 2021 at 11:07:40PM +0900, Masahiro Yamada wrote: > On Thu, Oct 28, 2021 at 10:44 PM Peter Zijlstra wrote: > > > > Hi, > > > > Debian (and derived) distros ship their compilers as -$ver suffixed > > binaries. For gcc it is sufficent to use: > > > > $ make CC=gcc-12 > > > > However, clang builds (esp. clang-lto) need a whole array of tools to be > > exactly right, leading to unweildy stuff like: > > > > $ make CC=clang-13 LD=ld.lld=14 AR=llvm-ar-13 NM=llvm-nm-13 OBJCOPY=llvm-objcopy-13 OBJDUMP=llvm-objdump-13 READELF=llvm-readelf-13 STRIP=llvm-strip-13 LLVM=1 > > > > which is, quite franktly, totally insane and unusable. Instead use the > > already mandatory LLVM variable to convey this, enabling one such as > > myself to use: > > > > $ make LLVM=-13 > > > > This also lets one quickly test different clang versions. > > > Please read the commit log of > a0d1c951ef08ed24f35129267e3595d86f57f5d3 That's yuck, I like LLVM=-13 or LLVM=-12 much better to select between compilers. Means I don't have to remember wth they live and or wreck PATH.