Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1928706pxu; Sun, 6 Dec 2020 12:13:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrrY8hyasWJ0B+BEHT3b4OMLdDQVZLiqgm6DFDbq4pf67U2jHDJ3z3O1BUdkMtpa8veCnN X-Received: by 2002:a50:b941:: with SMTP id m59mr17359928ede.371.1607285609210; Sun, 06 Dec 2020 12:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607285609; cv=none; d=google.com; s=arc-20160816; b=OcO3SKz67uwvSOC8eSO7U7QBbugUKQTgEZJ0wlmIzAZ5YMDVznYyzNpfM38hVYhz2R Fo2/5UxX5AkpP4r/I/QG6+T2i/YhraC2bxIXt9BE2PeU0IdgEmg8g8hE1H3u2Hm/LSCQ hkGWY/02Xi3jHfs91sfFTBw+CXhl/KgtUavZSp4PUIHCBawBlM1GSHmJNs0f7lqcxPX7 PFR+z0mnqcIxF90srLzUHfyvl0RaNO/PZo697CfFvSqAQXD+Vg4IGI8D6u2J/dCJkWq+ 0PgLj4AyzewYcMAHYSt0sTwMEgVFy9xVvwOyb+6GieVK9E/zYL2c43ljfy1wBku9X6fy +Q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iz05We4T6eIjQaXBvxz0eSpPimwSlGMKW8WGflLLLgw=; b=A+No4GOXogFitk+gsoDH3zWV/MqKF1k4PvbbrVK6QvlV9hy62n1X1WoZr/Qzr/R9lF /JmyTVwvdmm3Sl/SHFEGZ+5Z7R3Kbnh3UJ7uF6sdRcxg5yQvadMuOIoo8KaYBq5WeuYv Bgoj9IR/b8gs2ORGp0jmeuVpBOLWIzUKrCl13tbbfUYj5NKJrNLeDpLChmDmJkrwkWzN R9Do6SOhyG6xP4oYV01Ji1O5mQDLM+JxNNna9voVVm43kdcOgQceyXtGvKn/vpPao3CI ebkkczg0KAMAKo0JtfCEQrzFNTXpmvFTp34eFP21q89KiloGiLKhxlnWLy6renyXVXLx eEdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="iS/yxV/u"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si5213498ejg.46.2020.12.06.12.13.05; Sun, 06 Dec 2020 12:13:29 -0800 (PST) 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=@google.com header.s=20161025 header.b="iS/yxV/u"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbgLFUKY (ORCPT + 99 others); Sun, 6 Dec 2020 15:10:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbgLFUKY (ORCPT ); Sun, 6 Dec 2020 15:10:24 -0500 Received: from mail-ua1-x943.google.com (mail-ua1-x943.google.com [IPv6:2607:f8b0:4864:20::943]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6283C0613D3 for ; Sun, 6 Dec 2020 12:09:43 -0800 (PST) Received: by mail-ua1-x943.google.com with SMTP id q68so3795088uaq.3 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=g5zyHfB47jTNfJHRs2o+QwMOc+4Y5kXuUf4RszDFCpX+5XROFGa+aM5E+h8cuYDh8e QUbJ3dFp+q3Ea9tIY0YyMsGNQ9sf5rADDfJiqzLQOK9cZoXzaA2q+hyHk4WXSI8V+9kP lOIELVnC5doYeYOvItRRPdX1+L2NNVcca8CZPisp9F3xelTFBMDap7SBCSduwr3PmCm9 SIDTvHA+gbMnFBWcfiUJq2VqqQ4BcHnqiAKsc0dCLedOsbNoBR88zNClBh2jGqVYUKVZ KIHE9V1KGwCg4V6KvTs08yaWUEGheKGm5R3vq1A6vAokC77WbWFdLV1qBXNIk/rGBdsD ZELQ== X-Gm-Message-State: AOAM533N4D6o8QckULL2hxwqy4zJ6AHkmWYNTVRu/UcOgwoknBg7JBEh EfZZBeWS8iLTCyHGQJXHj5BiP9GfJVhbz2/zRgMDUA== 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-kernel@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