From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9193BC19425 for ; Sun, 6 Dec 2020 20:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6504D2333E for ; Sun, 6 Dec 2020 20:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgLFUKY (ORCPT ); Sun, 6 Dec 2020 15:10:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgLFUKY (ORCPT ); Sun, 6 Dec 2020 15:10:24 -0500 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C965BC0613D1 for ; Sun, 6 Dec 2020 12:09:43 -0800 (PST) Received: by mail-ua1-x942.google.com with SMTP id t15so3789030ual.6 for ; Sun, 06 Dec 2020 12:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=iS/yxV/uv33bWygYcp3w94mm68WCg/cooZBDHGRBRFCb+HEVGfBEws+dpr/6P25Mqk CGF0txaBIDtDjqi1yLxaRHzbKNu312tAIiWry1c6H2XUemwifDXDJ3xgms3nJQh018Ju tSfem3j42gdxUipuE2UCBGdP6HbCXjgyA35rk3ybR2x5sUXsvaX34+w/11PCnDP3wUw3 VXU3d3GrfxpXDM3mNsWNN8WzS04oerefikrSUgI3Sa41DzU+d/SyYsbVuDLVrcBbBAFd TPfpfk+LViEDwCmkthUfnAh26cBtd4O/zl0ILiNY2vgWj3ccwdwRthGGUZbaHtAB4IuL 4E/g== 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; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=JCaGXoF0Q0XcgE/3iakFZmIqZExDumFxkayxw9RwELuNHCZKafRH0mgDxozajo8T/t M7HYGUaV9S72CAErNCqgEdtlLLyTAUWI3fZ2hUM7C3J2Um7WLBNF5okg1x1oZP5Vyua0 A1ZUYoP2tGMqgsk0BAbIhHwdipdxji1kDB+AfpRiTB3lUNCpHAs8SJe71KqPl/Ci4KZd dMBsKo/v3i+/C3QdxfayLGbtce/pXkZCxeTsBWMqcl2V5U981++V+51hK78QJE0KYaFi vl3SBzvc4rtAhVbkGm8apR3KetlPApbyZnYy07y5uJ166qxjykXXUZSNzjdrimxmECyQ rhbQ== X-Gm-Message-State: AOAM533/93XlC2jHJomTNdPIWbP0iPnDx5uGR4ro5TvxZzLz/FPJAh2x 4bqSrCCMjcttN3p2s3F0puhY9ChmXUuC/CQmEvZDUQ== X-Google-Smtp-Source: ABdhPJyKCb8VYAdpRAyuT9QnDEa4WUbLFAwf7yIvP0eytyeCFIBxggFhwRm1Itv8d1sjhOU4I4dMU+iMqgn79bJuOn0= X-Received: by 2002:ab0:6f0f:: with SMTP id r15mr3484878uah.52.1607285382144; Sun, 06 Dec 2020 12:09:42 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> <20201203112622.GA31188@willie-the-truck> <20201203182252.GA32011@willie-the-truck> <20201206065028.GA2819096@ubuntu-m3-large-x86> In-Reply-To: <20201206065028.GA2819096@ubuntu-m3-large-x86> From: Sami Tolvanen Date: Sun, 6 Dec 2020 12:09:31 -0800 Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Nathan Chancellor Cc: Nick Desaulniers , Will Deacon , Masahiro Yamada , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , PCI , Jian Cai , Kristof Beyls Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, Dec 5, 2020 at 10:50 PM Nathan Chancellor wrote: > > On Fri, Dec 04, 2020 at 02:52:41PM -0800, Sami Tolvanen wrote: > > On Thu, Dec 3, 2020 at 2:32 PM Nick Desaulniers wrote: > > > > > > So I'd recommend to Sami to simply make the Kconfig also depend on > > > clang's integrated assembler (not just llvm-nm and llvm-ar). > > > > Sure, sounds good to me. What's the preferred way to test for this in Kconfig? > > > > It looks like actually trying to test if we have an LLVM assembler > > (e.g. using $(as-instr,.section > > ".linker-options","e",@llvm_linker_options)) doesn't work as Kconfig > > doesn't pass -no-integrated-as to clang here. After a closer look, that's actually not correct, this seems to work with Clang+LLD no matter which assembler is used. I suppose we could test for .gasversion. to detect GNU as, but that's hardly ideal. > >I could do something > > simple like $(success,echo $(LLVM) $(LLVM_IAS) | grep -q "1 1"). > > > > Thoughts? > > > > Sami > > I think > > depends on $(success,test $(LLVM_IAS) -eq 1) > > should work, at least according to my brief test. Sure, looks good to me. However, I think we should also test for LLVM=1 to avoid possible further issues with mismatched toolchains instead of only checking for llvm-nm and llvm-ar. Sami