Re: [PATCH v3] gcov: Disable GCOV_PROFILE_ALL on 32-bit UML with Clang 20/21

Nathan Chancellor
2026-04-09T18:26:26Z

On Thu, Apr 09, 2026 at 04:47:32PM +0200, Johannes Berg wrote:
> Hi,
>
> Maybe the subject should say "um:" instead of "gcov:" now?
>
> (I'm assuming you want us to apply it to uml tree.)
>
> > Prevent the bad combination by disabling UML's ARCH_HAS_GCOV_PROFILE_ALL
> > on 32-bit when using Clang 20.x or 21.x.
>
> You say 20.x or 21.x,
>
> > + # Clang 20 & 21 miscompute __builtin_object_size() under -fprofile-arcs
> > + # on 32-bit, causing spurious compile-time errors in check_copy_size().
> > + select ARCH_HAS_GCOV_PROFILE_ALL if !(!64BIT && CLANG_VERSION >= 200000 && CLANG_VERSION < 220100)
>
> and I see that 22.0 doesn't even exist, and maybe that's a general
> pattern, but it still looks confusing? Wouldn't it be better simpler to
> say < 220000? At least to me that more obviously is "up to 21.x". After
> all, 20.0 also didn't exist, and you did >=200000, not >200000 or
> >=200100?

22.0.0 means a development cycle version of LLVM 22, whereas 22.1.0 is
the released version (mirroring how GCC versioning works). The bug was
not fixed in the 22 development cycle, it was fixed at the beginning of
the 23 development cycle then backported to 22.1.0 before the final
release, so I think the bounds is correct as it is. We assume all
versions of 20 and 21 and the development version of 22 have the bug.

Cheers,
Nathan