Date: Sun, 4 Sep 2022 22:51:25 +0800 From: Po-Chuan Hsieh <sunpoet@freebsd.org> To: Adam Weinberger <adamw@adamw.org> Cc: ports-committers <ports-committers@freebsd.org>, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 538a001f90bb - main - archivers/zstd: Change build system from meson to gmake Message-ID: <CAMHz58SLocKAXd=0%2B0H8GXPp6artDUdPCfYL3ZACP2UY8pu18Q@mail.gmail.com> In-Reply-To: <CAP7rwchPWbqJ2bKVrW8ou8nPvYmXh_D8Yo-jmQE7r7RGDtLxoA@mail.gmail.com> References: <202208271031.27RAV5RN047637@gitrepo.freebsd.org> <CAP7rwchPWbqJ2bKVrW8ou8nPvYmXh_D8Yo-jmQE7r7RGDtLxoA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000001f8e5205e7db1bcd Content-Type: text/plain; charset="UTF-8" On Sun, Aug 28, 2022 at 6:31 PM Adam Weinberger <adamw@adamw.org> wrote: > > > On Sat, Aug 27, 2022 at 4:31 AM Po-Chuan Hsieh <sunpoet@freebsd.org> > wrote: > >> The branch main has been updated by sunpoet: >> >> URL: >> https://cgit.FreeBSD.org/ports/commit/?id=538a001f90bbf14b5bdaa556119925699adb1849 >> >> commit 538a001f90bbf14b5bdaa556119925699adb1849 >> Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> >> AuthorDate: 2022-08-27 10:23:30 +0000 >> Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> >> CommitDate: 2022-08-27 10:23:30 +0000 >> >> archivers/zstd: Change build system from meson to gmake >> >> - Use BINARY_ALIAS and remove TEST_DEPENDS: md5sum from base system >> works fine >> - Remove TEST option >> - Bump PORTREVISION for package change >> >> from README.md [1]: >> make is the officially maintained build system of this project. All >> other build >> systems are "compatible" and 3rd-party maintained, they may feature >> small >> differences in advanced options. When your system allows it, prefer >> using make >> to build zstd and libzstd. >> >> Reference: >> https://github.com/facebook/zstd/blob/dev/README.md#build-instructions >> [1] >> --- >> >> diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile >> index 49255dbd1187..ed8af4b8bddf 100644 >> --- a/archivers/zstd/Makefile >> +++ b/archivers/zstd/Makefile >> >> +OPTIONS_DEFINE= OPTIMIZED_CFLAGS >> >> -OPTIONS_DEFINE= LTO LZ4 OPTIMIZED_CFLAGS TEST >> -OPTIONS_DEFAULT=LZ4 >> - >> -LTO_MESON_TRUE= b_lto >> -LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 >> -LZ4_MESON_ENABLED= lz4 >> -LZ4_USES= localbase:ldflags >> OPTIMIZED_CFLAGS_VARS= CFLAGS+=-O3 >> -TEST_MESON_TRUE= bin_tests >> > > Hi Po-Chuan, > > I did enjoy the speedup from the LTO option. Any interest in adding back > an option for -flto? Upstream lib/README.md encourages it for programs that > link to zstd, but it's nice to have it for the zstd binary itself too. > > # Adam > > > -- > Adam Weinberger > adamw@adamw.org > https://www.adamw.org > Hi Adam, Did you try adding WITH_LTO=yes in /etc/make.conf (see Mk/Features/lto.mk)? Does it work for you? I did not use LTO myself. And I'm not sure which one is the correct way, an LTO option or WITH_LTO, to add LTO support. Regarding the LTO option here, b_lto is from meson [1], not zstd. >From my point of view, it (b_lto) should be added to either Mk/Features/ lto.mk or Mk/Uses/meson.mk. [1] https://mesonbuild.com/Builtin-options.html Regards, sunpoet --0000000000001f8e5205e7db1bcd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Sun, Aug 28, 2022 at 6:31 PM Adam Wein= berger <<a href=3D"mailto:adamw@adamw.org" target=3D"_blank">adamw@adamw= .org</a>> wrote:<br></div><div class=3D"gmail_quote"><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div sty= le=3D"font-family:arial,sans-serif"><br></div></div><br><div class=3D"gmail= _quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Aug 27, 2022 at 4:31 = AM Po-Chuan Hsieh <<a href=3D"mailto:sunpoet@freebsd.org" target=3D"_bla= nk">sunpoet@freebsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,= 204);padding-left:1ex">The branch main has been updated by sunpoet:<br> <br> URL: <a href=3D"https://cgit.FreeBSD.org/ports/commit/?id=3D538a001f90bbf14= b5bdaa556119925699adb1849" rel=3D"noreferrer" target=3D"_blank">https://cgi= t.FreeBSD.org/ports/commit/?id=3D538a001f90bbf14b5bdaa556119925699adb1849</= a><br> <br> commit 538a001f90bbf14b5bdaa556119925699adb1849<br> Author:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><br> AuthorDate: 2022-08-27 10:23:30 +0000<br> Commit:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><br> CommitDate: 2022-08-27 10:23:30 +0000<br> <br> =C2=A0 =C2=A0 archivers/zstd: Change build system from meson to gmake<br> <br> =C2=A0 =C2=A0 - Use BINARY_ALIAS and remove TEST_DEPENDS: md5sum from base = system works fine<br> =C2=A0 =C2=A0 - Remove TEST option<br> =C2=A0 =C2=A0 - Bump PORTREVISION for package change<br> <br> =C2=A0 =C2=A0 from README.md [1]:<br> =C2=A0 =C2=A0 make is the officially maintained build system of this projec= t. All other build<br> =C2=A0 =C2=A0 systems are "compatible" and 3rd-party maintained, = they may feature small<br> =C2=A0 =C2=A0 differences in advanced options. When your system allows it, = prefer using make<br> =C2=A0 =C2=A0 to build zstd and libzstd.<br> <br> =C2=A0 =C2=A0 Reference:=C2=A0 =C2=A0 =C2=A0 <a href=3D"https://github.com/= facebook/zstd/blob/dev/README.md#build-instructions" rel=3D"noreferrer" tar= get=3D"_blank">https://github.com/facebook/zstd/blob/dev/README.md#build-in= structions</a> [1]<br> ---<br> <br> diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile<br> index 49255dbd1187..ed8af4b8bddf 100644<br> --- a/archivers/zstd/Makefile<br> +++ b/archivers/zstd/Makefile<br><br> +OPTIONS_DEFINE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 OPTIMIZED_CFLAGS<br> <br> -OPTIONS_DEFINE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 LTO LZ4 OPTIMIZED_CFLAGS TEST= <br> -OPTIONS_DEFAULT=3DLZ4<br> -<br> -LTO_MESON_TRUE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b= _lto<br> -LZ4_LIB_DEPENDS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0liblz4.so:archivers/liblz4<br= > -LZ4_MESON_ENABLED=3D=C2=A0 =C2=A0 =C2=A0lz4<br> -LZ4_USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 localbase:ldfl= ags<br> =C2=A0OPTIMIZED_CFLAGS_VARS=3D CFLAGS+=3D-O3<br> -TEST_MESON_TRUE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0bin_tests<br> </blockquote></div><br clear=3D"all"><div><div style=3D"font-family:arial,s= ans-serif">Hi Po-Chuan,</div></div><div><br></div><div><div style=3D"font-f= amily:arial,sans-serif">I did enjoy the speedup from the LTO option. Any in= terest in adding back an option for -flto? Upstream lib/README.md encourage= s it for programs that link to zstd, but it's nice to have it for the z= std binary itself too.</div><div style=3D"font-family:arial,sans-serif"><br= ></div><div style=3D"font-family:arial,sans-serif"># Adam<br></div><br></di= v><div><br></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div><div dir=3D"= ltr"><div>Adam Weinberger</div><div><a href=3D"mailto:adamw@adamw.org" targ= et=3D"_blank">adamw@adamw.org</a></div><div><a href=3D"https://www.adamw.or= g" target=3D"_blank">https://www.adamw.org</a></div></div></div></div></div= ></div></blockquote><div><br></div><div>Hi Adam,</div><div><br></div><div><= div>Did you try adding WITH_LTO=3Dyes in /etc/make.conf (see Mk/Features/<a= href=3D"http://lto.mk" target=3D"_blank">lto.mk</a>)? Does it work for you= ?</div><div><br></div></div><div>I did not use LTO myself.</div><div>And I&= #39;m not sure which one is the correct way, an LTO option or WITH_LTO, to = add LTO support.<br></div><div><br></div><div>Regarding the LTO option here= , b_lto is from meson [1], not zstd.=C2=A0</div><div>From my point of view,= it (b_lto) should be added to either=C2=A0Mk/Features/<a href=3D"http://lt= o.mk" target=3D"_blank">lto.mk</a> or=C2=A0Mk/Uses/<a href=3D"http://meson.= mk" target=3D"_blank">meson.mk</a>.</div><div><br></div><div>[1]=C2=A0<a hr= ef=3D"https://mesonbuild.com/Builtin-options.html" target=3D"_blank">https:= //mesonbuild.com/Builtin-options.html</a></div><div><br></div><div><div>Reg= ards,</div><div>sunpoet</div></div></div></div> --0000000000001f8e5205e7db1bcd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMHz58SLocKAXd=0%2B0H8GXPp6artDUdPCfYL3ZACP2UY8pu18Q>