lkml.org 
[lkml]   [2021]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: linux: build failure: error: "__has_attribute" is not defined
On Tue, Sep 14, 2021 at 7:59 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, Sep 14, 2021 at 6:05 PM Tetsuo Handa
> <penguin-kernel@i-love.sakura.ne.jp> 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

\
 
 \ /
  Last update: 2021-09-15 06:01    [W:0.063 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site