Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14
Date: Mon, 15 Sep 2025 21:32:12 UTC
On Mon, 15 Sep 2025, Warner Losh wrote: > On Mon, Sep 15, 2025, 1:26 PM Bjoern A. Zeeb <bz@freebsd.org> wrote: > >> On Mon, 15 Sep 2025, Warner Losh wrote: >> >>> The branch main has been updated by imp: >>> >>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=5e0a4859f28ad4869f7a73faf42debc355a370bf >>> >>> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf >>> Author: Warner Losh <imp@FreeBSD.org> >>> AuthorDate: 2025-09-14 18:03:16 +0000 >>> Commit: Warner Losh <imp@FreeBSD.org> >>> CommitDate: 2025-09-15 03:03:45 +0000 >>> >>> iwlwifi: Don't compile for gcc before 14 >>> >>> gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kpi >>> uses this unconditionally. While in this one use, it might not be >>> needed, I opted to not compile iwlwifi when building gcc12 or 13 >> rather >>> than risk breaking it for everbody else. >>> >>> With this change gcc12 builds the kernel. Maybe this will stop jenkins >>> email for every commit I make. >>> >>> Sponsored by: Netflix >>> --- >>> sys/modules/Makefile | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/sys/modules/Makefile b/sys/modules/Makefile >>> index 5315d518afd8..f9fdbca78869 100644 >>> --- a/sys/modules/Makefile >>> +++ b/sys/modules/Makefile >>> @@ -576,7 +576,10 @@ _mlx5ib= mlx5ib >>> ${MACHINE_CPUARCH} == "i386" >>> _ena= ena >>> _gve= gve >>> +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation >> >> (a) I beleive there is no __builtin_bitcountg but you mean >> __builtin_popcountg >> both here and in the commit message. >> > > Yes. > > (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM >> >> (c) There is no direct use in any LinuxKPI based wireless driver: >> % grep -r __builtin_popcountg sys/contrib/dev >> % >> >> (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned >> commit >> in LinuxKPI. >> > > Yes. I noticed all that. Didn't see a trivial way to fix it right. > > (5) Please do it right and in the place where it is actually defined to be >> used, >> in LinuxKPI, and not here as it can be easily fixed there with an >> #ifdef or >> otherwise as there were alternatives on the review if I remember >> correctly. >> > > Knock yourselves out. I was tired of the CI jobs whining and this was the > easiest way to make that stop. I've got too many things on my plate to > refine this more. If you want to support older gcc for this driver, that's > up to you. The ci jobs have been failing for weeks if not longer Okay, will do. But gcc12/13 had been whining for months on a lot of things constantly. I really don't know how a day to do it right would have made a difference. -- Bjoern A. Zeeb r15:7