Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4981921iog; Wed, 22 Jun 2022 09:30:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vSqqCXsMDPK9DIDlzxw/doE5EUKnZYHDUoRBcgb1LrGRapgoPEZCMl3pUOifmCKh8xBg1I X-Received: by 2002:a17:90b:2c47:b0:1ec:f52d:90dd with SMTP id rw7-20020a17090b2c4700b001ecf52d90ddmr2209260pjb.221.1655915404397; Wed, 22 Jun 2022 09:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655915404; cv=none; d=google.com; s=arc-20160816; b=dX7hD6F1ctU2jxqNhX9gYQzTHKtnRvQx9Yb2+QhsG1ZRDS4dfyaD870tms0ZX8Rp7X cG+uBoIbZ5L3Wz95d8GNAT2rHlHW9fr3vNcknHSb2hIZ9n09OKCfgF30urBbJc7K/BvQ gCUSWw+hVVoD2yweZu80A3z7KPYl3z5dIENkkjQEtEf3eSU4auteSFjRrjYY4g2Rs+a8 zW9PCA15UUxihYyUFFgcKh1gR+R+F8koWqhf2kVnTJC3XuOq65Zfw94hP+UNxoEAoGd7 gJYSaqIC27VLmjN54uWPYpqc9KX4SZPuikI0cBAYW/RPkcugziW9NO/NuFwSXG/NN2tr T2IA== 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=La2lbdp3UKjWCqW4lfnhUIczS1kJzOzEyt2PeIAhoKo=; b=VBmPsOpA/Wd1Vtg9XNzGzDOGZa3bVuVnQqJ4sBRibmAB6FA4IsNX/rs5kMgnql4KTt 5/AIvaa4IqAQ6RNO7OLv5mn+MM2u77CIrQymAAAYgB/Heqy+TOiZeQPSzwgmjdhYs5mB whCPX9yt7FJjBkuRSydkP+wuilfP9zIwMiesV2aHnRezyIVHy/1ApdiPjNaVQ7oFR4W3 RJyrzCWnb9KuQ3X2BpY2h12//NPIgkX69t8i8FMoeKRkkeqLT2fCwkwXlad/E5zMUhjV mjDBnheHD3q0eReHMdfCyRaQBD88uCt0WzQ8u/ky0ciKPd6VrSsKcMhTSZd7GuCqAweE iirQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="FfAyOh/D"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a630210000000b0040c7a354ea9si17612045pgc.779.2022.06.22.09.29.51; Wed, 22 Jun 2022 09:30:04 -0700 (PDT) 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=@linux-foundation.org header.s=google header.b="FfAyOh/D"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376502AbiFVQVf (ORCPT + 99 others); Wed, 22 Jun 2022 12:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357785AbiFVQVa (ORCPT ); Wed, 22 Jun 2022 12:21:30 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A4853C720 for ; Wed, 22 Jun 2022 09:21:29 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id e40so12079505eda.2 for ; Wed, 22 Jun 2022 09:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=La2lbdp3UKjWCqW4lfnhUIczS1kJzOzEyt2PeIAhoKo=; b=FfAyOh/DVgRc9cG+OdaMU7PGb120Oo+8Kt5ymO0wHtxBrqKW6X7uECKSgxFEsKK7FZ ++TO/Q/qoaRDQ3KpT2ZrF2Di7QOCKeDTU2gFD7Id15IeekIIww1BKJvriU3KWot8Qpd6 m/1qCo3kwFiKykHlUgjb8oqTit3FZn4QWp6Bs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=La2lbdp3UKjWCqW4lfnhUIczS1kJzOzEyt2PeIAhoKo=; b=FBVYtsMhfLy9QnHdCMHs7I7GDvfjVRHJgm+G8etpIa0frwuf17aYyKLpjGJXcK6DPa xK9amvdP6RABaBJFIDPm5+dkOTUrguRBE4Gz5ZN5bw3jZ61GR0mSVk5UDjC7zyX+RzVS 45zPcw1zQN1jfWUSyOeC9EH0M7LdbC0v6yCZ3DMkNitpKjOmARkD/IyCrq4jgHuw1p7k AX0GcFxfltaBHUemymK6SULdhK6jN3AIOH8duMapa+oWSXWZ2i9amHQDwhYbClo2iZD7 4pT8hLvK7+hg70ewQXQdjwZ2Qfj40usMHSvyuqpZAyEHvpFjfkjOUqs0xfx66VVYoeN/ aBtw== X-Gm-Message-State: AJIora9sRHmq1O3x1+XhbkA6CKpS+KcBCCkHxTcdkaSJ1WKp8KhWaZg/ /d4gsCIaa6Db9HaSazD59XKG5CG9DsaT2W0v X-Received: by 2002:a05:6402:1e88:b0:435:bf05:f0f with SMTP id f8-20020a0564021e8800b00435bf050f0fmr1252883edf.2.1655914887929; Wed, 22 Jun 2022 09:21:27 -0700 (PDT) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com. [209.85.221.50]) by smtp.gmail.com with ESMTPSA id r1-20020a170906280100b006fefd1d5c2bsm9678781ejc.148.2022.06.22.09.21.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jun 2022 09:21:26 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id i10so20381982wrc.0 for ; Wed, 22 Jun 2022 09:21:26 -0700 (PDT) X-Received: by 2002:a5d:6da3:0:b0:219:bcdd:97cd with SMTP id u3-20020a5d6da3000000b00219bcdd97cdmr4126190wrs.274.1655914886112; Wed, 22 Jun 2022 09:21:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Wed, 22 Jun 2022 11:21:09 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: mainline build failure due to 281d0c962752 ("fortify: Add Clang support") To: Nathan Chancellor Cc: Sudip Mukherjee , Kees Cook , Nick Desaulniers , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Netdev , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_RED autolearn=no 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 Wed, Jun 22, 2022 at 10:02 AM Nathan Chancellor wrote: > > Right, we are working on a statically linked and optimized build of LLVM > that people can use similar to the GCC builds provided on kernel.org, > which should make the compile time problem not as bad as well as making > it easier for developers to get access to a recent version of clang with > all the fixes and improvements that we have made in upstream LLVM. So I'm on the road, and will try to see how well I can do that allmodconfig build on my poor laptop and see what else goes wrong for now. But I do have to say that it's just a lot better if the regular distro compiler build works out of the box. I did build my own clang binary for a while, just because I was an early adopter of the whole "ask goto with outputs" thing, but I've been *so* much happier now that I don't need to do that any more. So I would prefer not going backwards. I wish the standard clang build just stopped doing the crazy shared library thing. The security arguments for it are just ridiculous, when any shared library update for any security reason would mean a full clang update _anyway_. I realize it's partly distro rules too, but the distros only do that "we always build shared libraries" when the project itself makes that an option. And it's a really stupid option for the regular C compiler case. Side note: I think gcc takes almost exactly the opposite approach, and does much better as a result. It doesn't do a shared libary, but what it *does* do is make 'gcc' itself a reasonably small binary that just does the command line front-end parsing. The advantage of the gcc model is that it works *really* well for the "test compiler options" kind of stage, where you only run that much simpler 'gcc' wrapper binary. We don't actually take full advantage of that, because we do end up doing a real "build" of an empty file, so "cc1" does actually get executed, but even then it's done fairly efficiently with 'vfork()'. That "cc-option" part of the kernel build is actually noticeable during configuration etc, and clang is *much* slower because of how it is built. See time clang -Werror -c -x c /dev/null and compare it with gcc. And if you want to see a really *big* difference, pick a command line option that causes an error because it doesn't exist.. I really wish clang wasn't so much noticeably slower. It's limiting what I do with it, and I've had other developers say the same. Linus