Date: Thu, 9 Mar 2023 10:54:20 -0700 From: Warner Losh <imp@bsdimp.com> To: John Baldwin <jhb@freebsd.org> Cc: Ed Maste <emaste@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c581962414ed - main - src.conf.5: Add some WITH_/WITHOUT_ option descriptions Message-ID: <CANCZdfpWLQAArrRK7QsZ8=JQuk_=KoG3aS6h4vZN_vy4NQFUHg@mail.gmail.com> In-Reply-To: <7a33ffb1-f46f-fd57-b142-fc8641d923df@FreeBSD.org> References: <202303082331.328NViDn050541@gitrepo.freebsd.org> <dac0dcf2-a104-e326-43ae-91a084b61623@FreeBSD.org> <CAPyFy2DBaxyGefuVJou17%2BFo=Bj9eZ2YNzUy8CjY%2BmO%2BEHXDnA@mail.gmail.com> <CANCZdfrxGAOKOUGKLiz0up%2Bk1m0ZiVupXfDFP1rzF2-6gpujbA@mail.gmail.com> <CAPyFy2AmPg9781T_x8PsKGrq6OZXPEPZZF3xVu0PxmNfGWLtDA@mail.gmail.com> <7a33ffb1-f46f-fd57-b142-fc8641d923df@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000036360305f67b5686 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 9, 2023 at 10:30=E2=80=AFAM John Baldwin <jhb@freebsd.org> wrot= e: > On 3/9/23 7:10 AM, Ed Maste wrote: > > On Wed, 8 Mar 2023 at 23:12, Warner Losh <imp@bsdimp.com> wrote: > >> > >> Yea, there's no reason to have the description twice... > > > > It looks like the ones that have both WITH_ and WITHOUT_ descriptions > are: > > > > ATM AUTO_OBJ BIND_NOW CLANG CLANG_BOOTSTRAP CLANG_FULL CXGBETOOL > > DEBUG_FILES EFI FDT GCC GCC_BOOTSTRAP GCOV GDB GH_BC GNU_DIFF > > GOOGLETEST HYPERV KERNEL_RETPOLINE LIB32 LLD LLD_BOOTSTRAP LLD_IS_LD > > LLDB LLVM_ASSERTIONS LLVM_COV LLVM_CXXFILT LLVM_TARGET_AARCH64 > > LLVM_TARGET_ALL LLVM_TARGET_ARM LLVM_TARGET_MIPS LLVM_TARGET_POWERPC > > LLVM_TARGET_RISCV LLVM_TARGET_SPARC LLVM_TARGET_X86 LOADER_GELI > > LOADER_KBOOT LOADER_LUA LOADER_OFW LOADER_UBOOT MALLOC_PRODUCTION > > MLX5TOOL MODULE_DRM MODULE_DRM2 NVME OFED OPENMP OPENSSL_KTLS PIE > > PROFILE RELRO REPRODUCIBLE_BUILD RETPOLINE SENDMAIL SHARED_TOOLCHAIN > > SSP STATS SYSTEM_COMPILER SYSTEM_LINKER TCP_WRAPPERS UNIFIED_OBJDIR > > USB_GADGET_EXAMPLES ZFS > > > > although not all of them are used (the ones that default on across all > > architectures). > > > > Looking at src.conf.5 the duplicates I see are: > > > > CXGBETOOL EFI FDT HYPERV LIB32 LLDB LOADER_GELI LOADER_KBOOT > > LOADER_LUA LOADER_OFW LOADER_UBOOT MLX5TOOL NVME OFED OPENMP > > OPENSSL_KTLS PIE ZFS > > > > Perhaps for these cases we can just skip the negative sense > > (WITHOUT_), just listing the architectures it applies to? > > > > Something like: > > > > WITH_CXGBETOOL > > Build cxgbetool(8) > > > > This is the default setting on amd64/amd64, arm64/aarch64= , > > i386/i386, powerpc/powerpc64 and powerpc/powerpc64le. > > > > WITHOUT_CXGBETOOL is the default setting on amd64/amd64, > > arm64/aarch64, i386/i386, powerpc/powerpc64 and > > powerpc/powerpc64le. > > My first thought was your first suggestion (a single FOO file that > permitted a common prefix for the with/without cases). However, your > second suggestion above is also fine and is probably easier to > implement? > > The other wrinkle is that we don't really handle BROKEN_OPTIONS ideally. > We just list the FOO option as defaulting to WITHOUT without telling > the user that actually it will fail to build if you enable it. Not > sure how much work that would be to fix. > Yes. Broken options are hard-wired to no on the platform. The current tooling doesn't account for this (but I suppose the script could be enhanced since it will just be in the BROKEN_OPTIONS list). I can toss an '.error' in when a WITH_FOO is defined or MK_FOO=3Dyes for a BROKEN option, but nobody has complained about this issue in the maybe 20 years we've been doing it. Warner --00000000000036360305f67b5686 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Mar 9, 2023 at 10:30=E2=80=AF= AM John Baldwin <<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/= 9/23 7:10 AM, Ed Maste wrote:<br> > On Wed, 8 Mar 2023 at 23:12, Warner Losh <<a href=3D"mailto:imp@bsd= imp.com" target=3D"_blank">imp@bsdimp.com</a>> wrote:<br> >><br> >> Yea, there's no reason to have the description twice...<br> > <br> > It looks like the ones that have both WITH_ and WITHOUT_ descriptions = are:<br> > <br> > ATM AUTO_OBJ BIND_NOW CLANG CLANG_BOOTSTRAP CLANG_FULL CXGBETOOL<br> > DEBUG_FILES EFI FDT GCC GCC_BOOTSTRAP GCOV GDB GH_BC GNU_DIFF<br> > GOOGLETEST HYPERV KERNEL_RETPOLINE LIB32 LLD LLD_BOOTSTRAP LLD_IS_LD<b= r> > LLDB LLVM_ASSERTIONS LLVM_COV LLVM_CXXFILT LLVM_TARGET_AARCH64<br> > LLVM_TARGET_ALL LLVM_TARGET_ARM LLVM_TARGET_MIPS LLVM_TARGET_POWERPC<b= r> > LLVM_TARGET_RISCV LLVM_TARGET_SPARC LLVM_TARGET_X86 LOADER_GELI<br> > LOADER_KBOOT LOADER_LUA LOADER_OFW LOADER_UBOOT MALLOC_PRODUCTION<br> > MLX5TOOL MODULE_DRM MODULE_DRM2 NVME OFED OPENMP OPENSSL_KTLS PIE<br> > PROFILE RELRO REPRODUCIBLE_BUILD RETPOLINE SENDMAIL SHARED_TOOLCHAIN<b= r> > SSP STATS SYSTEM_COMPILER SYSTEM_LINKER TCP_WRAPPERS UNIFIED_OBJDIR<br= > > USB_GADGET_EXAMPLES ZFS<br> > <br> > although not all of them are used (the ones that default on across all= <br> > architectures).<br> > <br> > Looking at src.conf.5 the duplicates I see are:<br> > <br> > CXGBETOOL EFI FDT HYPERV LIB32 LLDB LOADER_GELI LOADER_KBOOT<br> > LOADER_LUA LOADER_OFW LOADER_UBOOT MLX5TOOL NVME OFED OPENMP=C2=A0 <br= > > OPENSSL_KTLS PIE ZFS<br> > <br> > Perhaps for these cases we can just skip the negative sense<br> > (WITHOUT_), just listing the architectures it applies to?<br> > <br> > Something like:<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0WITH_CXGBETOOL<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Build cxgbetool(= 8)<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0This is the defa= ult setting on amd64/amd64, arm64/aarch64,<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0i386/i386, power= pc/powerpc64 and powerpc/powerpc64le.<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0WITHOUT_CXGBETOOL is the default setting on = amd64/amd64,<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arm64/aarch64, i= 386/i386, powerpc/powerpc64 and<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0powerpc/powerpc6= 4le.<br> <br> My first thought was your first suggestion (a single FOO file that<br> permitted a common prefix for the with/without cases).=C2=A0 However, your<= br> second suggestion above is also fine and is probably easier to<br> implement?<br> <br> The other wrinkle is that we don't really handle BROKEN_OPTIONS ideally= .<br> We just list the FOO option as defaulting to WITHOUT without telling<br> the user that actually it will fail to build if you enable it.=C2=A0 Not<br= > sure how much work that would be to fix.<br></blockquote><div><br></div><di= v>Yes. Broken options are hard-wired to no on the platform. The current too= ling doesn't account for this (but I suppose the script could be enhanc= ed since it will just be in the BROKEN_OPTIONS list).</div><div><br></div><= div>I can toss an '.error' in when a WITH_FOO is defined or MK_FOO= =3Dyes for a BROKEN option, but nobody has complained about this issue in t= he maybe 20 years we've been doing it.</div><div><br></div><div>Warner<= /div></div></div> --00000000000036360305f67b5686--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpWLQAArrRK7QsZ8=JQuk_=KoG3aS6h4vZN_vy4NQFUHg>