Date: Mon, 15 Sep 2025 15:17:58 -0600 From: Warner Losh <imp@bsdimp.com> To: "Bjoern A. Zeeb" <bz@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= <dumbbell@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org> Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 Message-ID: <CANCZdfpQYj6a0rYeHXNCQe9WQy=LQZj49-DMxKxDFeYFMu-DfQ@mail.gmail.com> In-Reply-To: <p5327015-51o4-3r0r-1rq4-347r7q995677@SerrOFQ.bet> References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> <p5327015-51o4-3r0r-1rq4-347r7q995677@SerrOFQ.bet>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000569709063edd8a31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025, 1:26=E2=80=AFPM 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=3D5e0a4859f28ad4869f7a73faf42debc= 355a370bf > > > > 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 kp= i > > 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 jenki= ns > > 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=3D mlx5ib > > ${MACHINE_CPUARCH} =3D=3D "i386" > > _ena=3D ena > > _gve=3D 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 I am Cc:ing dumbbell as well as he needed the change for DRM. > > PS: we also need to fix this in sys/sys at some point and save us some > trouble. > What's to fix? Creating the Generic wrapper around builtin_popcount? Warner > > +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_VERSION} < 140000) > > _iwlwifi=3D iwlwifi > > +.endif > > _rtw88=3D rtw88 > > _rtw89=3D rtw89 > > _vmware=3D vmware > > > > -- > Bjoern A. Zeeb r15:7 > --000000000000569709063edd8a31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote gmail_quote_contai= ner"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Sep 15, 2025, 1:26=E2=80= =AFPM Bjoern A. Zeeb <<a href=3D"mailto:bz@freebsd.org">bz@freebsd.org</= a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 15 Sep 2025, = Warner Losh wrote:<br> <br> > The branch main has been updated by imp:<br> ><br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28a= d4869f7a73faf42debc355a370bf" rel=3D"noreferrer noreferrer" target=3D"_blan= k">https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42deb= c355a370bf</a><br> ><br> > commit 5e0a4859f28ad4869f7a73faf42debc355a370bf<br> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2025-09-14 18:03:16 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2025-09-15 03:03:45 +0000<br> ><br> >=C2=A0 =C2=A0 iwlwifi: Don't compile for gcc before 14<br> ><br> >=C2=A0 =C2=A0 gcc 13 and earlier don't have __builtin_bitcountg. Th= e linux wifi kpi<br> >=C2=A0 =C2=A0 uses this unconditionally. While in this one use, it migh= t not be<br> >=C2=A0 =C2=A0 needed, I opted to not compile iwlwifi when building gcc1= 2 or 13 rather<br> >=C2=A0 =C2=A0 than risk breaking it for everbody else.<br> ><br> >=C2=A0 =C2=A0 With this change gcc12 builds the kernel. Maybe this will= stop jenkins<br> >=C2=A0 =C2=A0 email for every commit I make.<br> ><br> >=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix<br> > ---<br> > sys/modules/Makefile | 3 +++<br> > 1 file changed, 3 insertions(+)<br> ><br> > diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br> > index 5315d518afd8..f9fdbca78869 100644<br> > --- a/sys/modules/Makefile<br> > +++ b/sys/modules/Makefile<br> > @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib<br> >=C2=A0 =C2=A0 =C2=A0${MACHINE_CPUARCH} =3D=3D "i386"<br> > _ena=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ena<br> > _gve=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve<br> > +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation<= br> <br> (a) I beleive there is no __builtin_bitcountg but you mean __builtin_popcou= ntg<br> both here and in the commit message.<br></blockquote></div></div><div dir= =3D"auto"><br></div><div dir=3D"auto">Yes.</div><div dir=3D"auto"><br></div= ><div dir=3D"auto"><div class=3D"gmail_quote gmail_quote_container"><blockq= uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc = solid;padding-left:1ex"> (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM= <br> <br> (c) There is no direct use in any LinuxKPI based wireless driver:<br> % grep -r __builtin_popcountg sys/contrib/dev<br> %<br> <br> (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned co= mmit<br> =C2=A0 =C2=A0 =C2=A0in LinuxKPI.<br></blockquote></div></div><div dir=3D"au= to"><br></div><div dir=3D"auto">Yes. I noticed all that. Didn't see a t= rivial way to fix it right.</div><div dir=3D"auto"><br></div><div dir=3D"au= to"><div class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l= eft:1ex"> (5) Please do it right and in the place where it is actually defined to be = used,<br> =C2=A0 =C2=A0 =C2=A0in LinuxKPI, and not here as it can be easily fixed the= re with an #ifdef or<br> =C2=A0 =C2=A0 =C2=A0otherwise as there were alternatives on the review if I= remember correctly.<br></blockquote></div></div><div dir=3D"auto"><br></di= v><div dir=3D"auto">Knock yourselves out. I was tired of the CI jobs whinin= g and this was the easiest way to make that stop. I've got too many thi= ngs on my plate to refine this more. If you want to support older gcc for t= his driver, that's up to you. The ci jobs have been failing for weeks i= f not longer</div><div dir=3D"auto"><br></div><div dir=3D"auto"><div class= =3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st= yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I am Cc:ing dumbbell as well as he needed the change for DRM.<br> <br> PS: we also need to fix this in sys/sys at some point and save us some<br> trouble.<br></blockquote></div></div><div dir=3D"auto"><br></div><div dir= =3D"auto">What's to fix? Creating the Generic wrapper around builtin_po= pcount?</div><div dir=3D"auto"><br></div><div dir=3D"auto">Warner</div><div= dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote gmail_q= uote_container"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e= x;border-left:1px #ccc solid;padding-left:1ex"> <br> > +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_V= ERSION} < 140000)<br> > _iwlwifi=3D=C2=A0 =C2=A0 =C2=A0iwlwifi<br> > +.endif<br> > _rtw88=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw88<= br> > _rtw89=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw89<= br> > _vmware=3D=C2=A0 =C2=A0 =C2=A0 vmware<br> ><br> <br> -- <br> Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7<br> </blockquote></div></div></div> --000000000000569709063edd8a31--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpQYj6a0rYeHXNCQe9WQy=LQZj49-DMxKxDFeYFMu-DfQ>