Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp132841pxb; Tue, 14 Sep 2021 21:05:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxW97RtUElHBs3+OsncF1ZK/4kcMeocM2+0/qClmmO1PGkdtsxluWqGrLzVdhvBVeEmB1n X-Received: by 2002:a05:6512:903:: with SMTP id e3mr14312649lft.668.1631678704353; Tue, 14 Sep 2021 21:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631678704; cv=none; d=google.com; s=arc-20160816; b=N2F+GlICynGdfKmlVQLNY/ISS+fLGb6JTcWbS15ID8/aIbFIvfQOW/nUcsUaYIgcvk xshVSG2t5wEFxbC7PcKELZP2cEOGbS8Kp1Kpni4RfhMK1q07xj/YY7aUfS4ftVy1I7Xn GZPSI3jnMpPEi00/kh/Sr+ShxbDJD6t0EI/SAvjvC0WXDcEIUdFL4z8L+qN6jxtjRL5F X0yZljFgJ1vrKX5Nd2CDLMDuebQ24Z7ub+xhSeHj7vW10cKKtYggsH0fnfbtKLzKN8OO WKJs0Y/XweV/sbxdLHgs2Gx2mKPY8d4eh9/39bnpR+MK5zK7LjDqnfU0OojmnLom/AHN BlCw== 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=jLp7NBVpEmFUDWBBFiXkybAZlpHFnSOjtzW3fWt0ZTs=; b=l/4hgDxDE8xKOnjM5qo59r7Jux+71jykrINteo8dOTYPc8hAn0y1w1WNEBnrR8FCPg kkwtTcolLqVLIs7KWVMpGh7VUQmIPE5q6cBjK8sC9y1znh7+JYrAvzpPBAzRZbE2pGAc CDyTxI0R8vfOdsTYmd2ta2HBFcEjb94Aiz8e0P2a3toEXQQHVxpVfGlYM/zmhvoESuOS aHEUgLJZxYyDLO8m1PbG/TmoQycAiVP93rZBklj7jSfI40YsC1DFC2kXWKBLH9HtSb3w oxf4xOVRhgfXWRpWlvt9WcYsZubPkQTfq4e4f8J3eelNSvcJTuDZfdPlKJWbyrt+6TuV 3Znw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=CFr7I9nO; 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 q189si15824875ljb.402.2021.09.14.21.04.34; Tue, 14 Sep 2021 21:05:04 -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=@google.com header.s=20210112 header.b=CFr7I9nO; 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 S229506AbhIOECE (ORCPT + 99 others); Wed, 15 Sep 2021 00:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbhIOECA (ORCPT ); Wed, 15 Sep 2021 00:02:00 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF08C061574 for ; Tue, 14 Sep 2021 21:00:41 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id i25so3219093lfg.6 for ; Tue, 14 Sep 2021 21:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jLp7NBVpEmFUDWBBFiXkybAZlpHFnSOjtzW3fWt0ZTs=; b=CFr7I9nOS0o4V8Hk2T4m/boN2g5hFYtOg2KVDMucV4phyKCGKabCPwXrBLJGkjW41w TmU156jwHpntdfg0ckGeWINBuBgiJqQq6wIJp/Ls+R9YKxEpzt6gVWCLejwaj7zCdC/a WOHEL/ms5locbfgXMX3F70O4yy6F7zmJZIywWwvjRe3dQU6qj4XEeMFdWhMhlAcc2Zft iQhc2DX24U5yjWlvwT1hrrGP52L3FlowSyIVteeyznDTpuiw+imzKJ2t4MWyE3k1/oAH MjherCgAFTJJKOiXMAu93U3u2/3WYMsLHAjCtkXWMGWnxUhPqME/9/dkr3thJ7PWctKi qm1Q== 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=jLp7NBVpEmFUDWBBFiXkybAZlpHFnSOjtzW3fWt0ZTs=; b=sfycmixiyJIpS9nb0iN5aDBgZrryrnNc5F7mAN8pAkCvZfexzDZCxdcGXpdybpD8h9 O3Ys1exkzqNjrx//WSC/4tbTWPhljfMeJjUT5LHTh37WFLZ22uovE364u5bTOfPkgqqj 4Er8D+xioD0P4p9qWxfs4UP8ouxCKXg+tSNcVH9zg91mu/x1MUhi/Bsb6egKCyw+mGxZ AzuHww6nJjEeHHUS2eoaApYX+rD8TS9RiJjIcfQimvEidhErNB9jxRtK0zI3sDQXOJHs ihOKcJadkqmLaNqUvEn6KTC0zbr0AE4wfzB9EhRy/8AXQU7WaM7qqNcVb680UsnYMaC7 LtbA== X-Gm-Message-State: AOAM530/TdEJnIheTYbHgbvYt3vIMhbalOrlkkagTSAQFpScemshdUFE 0gPlZwhLuzVzhtIb2rm3uI9CP3vtL3GfFOvYGFZoew== X-Received: by 2002:a05:6512:2291:: with SMTP id f17mr15942387lfu.489.1631678439952; Tue, 14 Sep 2021 21:00:39 -0700 (PDT) MIME-Version: 1.0 References: <3bf6f4f4-9c96-6e0c-951d-5509175dddfe@kernel.org> In-Reply-To: From: Nick Desaulniers Date: Tue, 14 Sep 2021 21:00:28 -0700 Message-ID: Subject: Re: linux: build failure: error: "__has_attribute" is not defined To: Linus Torvalds Cc: Tetsuo Handa , Kees Cook , Nathan Chancellor , Stephen Rothwell , LKML , Masahiro Yamada , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 7:59 PM Linus Torvalds wrote: > > On Tue, Sep 14, 2021 at 6:05 PM Tetsuo Handa > wrote: > > > > It would be nice if Makefile can also check gcc version used for building tools. > > I think the real problem is that the tool headers are cut-down from > the real kernel headers, but not cut down enough, so they are still > very complex, often with stuff that just isn't worth it in user space > at all. > > And they _look_ like kernel headers - both in naming and in contents. > But they really aren't. > > And it turns out there are two independent bugs here. > > Bug #1 is that the tool header files look _so_ much like the main > kernel header files, that Nick thought that the > > #if GCC_VERSION >= 40300 > > was about the compiler we compile the kernel with. > > But no, it's about the host compiler. > > Easy mistake to make when the naming is so similar and the contents > are often also fairly closely related too. No, I got that. I don't get why you wouldn't keep those in sync, at least the minimum supported compiler version for both. Sure, for cross compiling HOSTCC and CC could be wildly different versions, but why should the minimum supported version differ between the two? Do we even document anywhere what's the lowest support compiler version for tools/ or HOSTCC? > But basically, commit 4e59869aa655 ("compiler-gcc.h: drop checks for > older GCC versions") was buggy, because it took the kernel compiler > version logic ("we require 5.1 to build the kernel") and applied it to > the tooling header files too (we do _not_ require the kernel compiler > for host tools). That the minimum versions don't need to match between the two is surprising to me. Probably to the reviewers of those patches, too. -- Thanks, ~Nick Desaulniers