Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp162339pxm; Tue, 1 Mar 2022 17:31:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpN/lqfQ2uC4GDbOFXQn0dHw3vHzAE5vK2xT7/RQOKwAkv0z0DRcZqVYJoLnkRKW1Z+9/t X-Received: by 2002:a05:6a00:1c9c:b0:4c0:3e77:22ea with SMTP id y28-20020a056a001c9c00b004c03e7722eamr30762431pfw.74.1646184719549; Tue, 01 Mar 2022 17:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646184719; cv=none; d=google.com; s=arc-20160816; b=gPiHeexhBF9sLJtaW+/y27uSJ3cCC04w8Enm9dPaGD6CKbaOJvJpF3iEm8CeSZ9tpn bswnxYmJ3btSI4RuNMP6GAsw+JeGVJJmaLIV4zeg/Zs7greW+88RwG+Fo7mHwBlP22F/ LuzY/KT3+q2kaj8bZoSxbriJ6m3GaQHgKqvGED7krPFe8ige+D4LdaplD9FH+PK8RA/A M073/dU92UEu2F8lBIkO3TRzRSaia4iGlyFHV6iYPMYzQAtiws6ldUC1sYB+ADLSsGBJ GwewBxxrFJKbjw3tqPCthHDdwf2d1Q1DohiT9o0LZtxakM5HxCSW/pEQmrSFF8I/XN6F hM/Q== 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=dEue/nkyyWORuSLNgZoXP119Ov1Eck1EH3kEX5AnUiQ=; b=WinWnS8zShWu+Sq2kGkdLGXUrD62oNPo75lUPY1fxLNzXM3dnSSJeuAyC+Ec9V/egu Lc4bP0vWkv2G4ydGjvQzWg5Xx2wcZQEt/c2hnz/wZ2D+dqYRMn/RvHsOmLFAv2YUiZsq HVl5bJbG82bmLoNT5d0tKSNCYqsqMhAlSgijaLQdxkMuyWQFmfjCXuuGRJqPL9NaZ44O tfDfDXBSfiCRDs/ioiIvybBhikRbup6egNXyqOij3PuJCS5YoHhnVzvMxA5gy9sP/yQd Wa72ART84TcfOCfDO59KGbUw6MSGemUDpt9MaSn7pgmDkWzWe4GUClE9vFZlLEnhwct/ p0dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="e/dx026C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020a63ba1a000000b003739acf4e03si15029224pgf.152.2022.03.01.17.31.40; Tue, 01 Mar 2022 17:31:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="e/dx026C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232941AbiCBAyW (ORCPT + 99 others); Tue, 1 Mar 2022 19:54:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233820AbiCBAyU (ORCPT ); Tue, 1 Mar 2022 19:54:20 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC3A31DF3 for ; Tue, 1 Mar 2022 16:53:37 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id b8so360168pjb.4 for ; Tue, 01 Mar 2022 16:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dEue/nkyyWORuSLNgZoXP119Ov1Eck1EH3kEX5AnUiQ=; b=e/dx026Cg0MiSh1JiBi7JH1dij6bXr0QLUeRt/f9pRTDL/WU92xojPJYEtMGzU3X2c l/sBdeLNdgDNP/9m/US1Z85emD+zb4VuhQQpzemiMYE4KaX5ZUjSASZp4PZItCrbsCfm fG07nhuS4Fd2+nlAmoCR/QWkBxGQqRKwcvUtkeW/Wy/t7guG5QDr5QxZ0uflQzKnU2eJ R65DqlAXbo1UOfrCjKDTOx5RUbKXW1oAEPP87jW8sC1K0+RjpKwKsIMfp3MW2D81URZH Kx0UFb95ZlNg4ZJ7MPw6AEMOpqi8Zn6Mq4g/9DjZ4xwss2pOQwR4dLwI/n+ql12/jRTi EV5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dEue/nkyyWORuSLNgZoXP119Ov1Eck1EH3kEX5AnUiQ=; b=5llPgu5rJUi+V1BH5CnHQChxvSGO/r6Fq7gNokb5v22lYT7LszNCFFkqR8GC462AVv V5GrdEAEMvmnQndVGHNBjumom9ZLg9F/tM3GgiatrT3vp69ciomv296uXKAVnQRTqAyV WQvdgoaUyCDdxeMYHCbuL9YDmgZDaIMbppyE/hp5FuS3pAlhA7S7iGOBN/IpZPFUfNMn vV0A7TXGKrv7vODnt/WVe5bRqrMFTGKG1DnGc4BXV7NKbdb0zZVhkcObNFgOUN89ToNj 5rqOJiSl+WlgLQ+WNW8llMnuJGcdpyuHonB6fVzs2w6mVLXdtCdClD9PnPJzVtIwv3FP JB2Q== X-Gm-Message-State: AOAM531/u13O4AXCjRJxec/JkDtebOZWxTqjb/H2T8s/lzT7Tw0nSb/K 46vM2IxTYGq4R06gE6igsF6Xog== X-Received: by 2002:a17:90a:8689:b0:1bd:4c83:4c5c with SMTP id p9-20020a17090a868900b001bd4c834c5cmr13402382pjn.142.1646182417336; Tue, 01 Mar 2022 16:53:37 -0800 (PST) Received: from google.com ([2620:15c:2ce:200:88f6:4b70:bdc0:5a68]) by smtp.gmail.com with ESMTPSA id np11-20020a17090b4c4b00b001bd4aa67bafsm3538870pjb.3.2022.03.01.16.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 16:53:36 -0800 (PST) Date: Tue, 1 Mar 2022 16:53:32 -0800 From: Fangrui Song To: Kees Cook Cc: Nick Desaulniers , Peter Zijlstra , x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com, jpoimboe@redhat.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, samitolvanen@google.com, mark.rutland@arm.com, alyssa.milburn@intel.com, mbenes@suse.cz, rostedt@goodmis.org, mhiramat@kernel.org, alexei.starovoitov@gmail.com, Masahiro Yamada , Linux Kbuild mailing list , llvm@lists.linux.dev, Nathan Chancellor Subject: Re: [PATCH v2 01/39] kbuild: Fix clang build Message-ID: <20220302005332.shcvokuyt4zz544d@google.com> References: <20220224145138.952963315@infradead.org> <20220224151322.072632223@infradead.org> <202203011636.40D2F83@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202203011636.40D2F83@keescook> X-Spam-Status: No, score=-18.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-01, Kees Cook wrote: >On Tue, Mar 01, 2022 at 01:16:04PM -0800, Nick Desaulniers wrote: >> Also, Kees mentions this is an issue for testing multiple different >> versions of gcc, too. There perhaps is a way to simplify the builds >> for BOTH toolchains; i.e. a yet-to-be-created shared variable denoting >> the suffix for binaries? The primary pain point seems to be Debian's >> suffixing scheme; it will suffix GCC, clang, and lld, but not GNU >> binutils IIUC. > >Right. Though I think auto-detection still makes sense. > >If I do: > > make CC=clang-12 LLVM=1 > >it'd be nice if it also used ld.lld-12. This transformation may be a bit magical. On Debian, /usr/bin/clang-13 is a symlink to /usr/lib/llvm-13/bin/clang . Will it be fine for the user to provide correct feasible PATH? >> [...] >> Just curious, what prefixes have you observed in the wild? > >For me, where ever I built clang, and "/usr/bin" > >-- >Kees Cook >