[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4a-2F_zKMeR0Yjo2WhRLmyoOQ1VdR2qdV34BrM-b_cQCQ@mail.gmail.com>
Date: Sun, 26 Jan 2025 18:21:47 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.14-rc1
On Sun, Jan 26, 2025 at 10:57 AM Uros Bizjak <ubizjak@...il.com> wrote:
>
> On Sat, Jan 25, 2025 at 11:09 PM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > On Fri, 24 Jan 2025 at 16:22, Andrew Morton <akpm@...ux-foundation.org> wrote:
> > >
> > > Linus, please merge the MM updates for the 6.14 development cycle,
> >
> > This does not build at all for me.
> >
> > I get
> >
> > ./arch/x86/include/asm/current.h:49:9: error: call to undeclared
> > function '__typeof_unqual__'; ISO C99 and later do not support
> > implicit function declarations [-Wimplicit-function-declaration]
> >
> > when running the Rust 'bindgen', and what seems to be going on is that
> > my version of *gcc* does support __typeof_unqual__, so I end up with
> >
> > CONFIG_CC_HAS_TYPEOF_UNQUAL=y
> >
> > in my kernel config, but I think that 'bindgen' that generates the
> > Rust bindings is based on LLVM, and clearly does not understand
>
> __typeof_unqual__ is available in Clang 19.1.0 in all C modes as an
> extension [1] and as reported in [2], bindgen 0,70.1 seems to parse
> __typeof_unqual__ okay.
>
> [1] https://releases.llvm.org/19.1.0/tools/clang/docs/ReleaseNotes.html
> [2] https://lore.kernel.org/lkml/9fa81826-8fa6-47e4-a0a2-4916e5d042a7@stanley.mountain/
>
> Maybe configure could detect bindgen version and disable
> CC_HAS_TYPEOF_UNQUAL [3] if it is too old?
bindgen ChangeLog does not mention __typeof_unqual__, so I assume that
the support depends on RUSTC_LLVM_VERSION.
Does the attached incremental patch work for you?
Uros.
View attachment "p.diff.txt" of type "text/plain" (604 bytes)
Powered by blists - more mailing lists