From nobody Sun Sep 4 14:51:25 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MLF3l6mPzz4bv1t for ; Sun, 4 Sep 2022 14:52:03 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MLF3l6KBTz3dJS for ; Sun, 4 Sep 2022 14:52:03 +0000 (UTC) (envelope-from sunpoet@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662303123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yKNWCWWJQw0a9tSwm34Rzo3yqJotV0lx/hNjWbQ6cqM=; b=H2+dGiMEFAwzM7itOaK8RY+qAc3d1TJjTod6j2Keu1beRdyh5Waza/12HKeWQGQS2IbgoT VOWSMEugj5kTBoy2U8H8XeHa/lJ/ncauN5EU4p7+kWzav3a7OLMdWh2yhcqiyynJCLaugT MNC2SkPXtdJm/NaYhPLqEyVOBwBVKGKCubDnZhevZtsLPHZGYAyx9HNtJls8j9PzQKFUEm m4VflEbhWUbxHnYBu62r7pwO4urww6tlQY6EvIdZDqii6RI4e5xBSyKLDl1XmkXGPrmpLj z6Y5lb79kRQs/bnIXueXxQuo4weFUyxYoLWjx0EwZB8ijxd0T9HBWe1vzb9usg== Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: sunpoet) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MLF3l5PZlzpfj for ; Sun, 4 Sep 2022 14:52:03 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: by mail-pj1-f43.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so2495072pjl.0 for ; Sun, 04 Sep 2022 07:52:03 -0700 (PDT) X-Gm-Message-State: ACgBeo0E0YK5H84gyST95D53GPB5mn5ZWyYcUFts7aehKgTjuV83rRbT nwNZLnOf8SxTW92nSTFDDFyGkU3unyPD8bH7bIWLEg== X-Google-Smtp-Source: AA6agR4XPrq53OL0m4o50LiZoM8ayHV4Du8fpcMmD58ZFQsFxHvAlHQ4Is4ZU9jG4pZOiI4XzTM8gx4X/4fKJVmp2Hc= X-Received: by 2002:a17:902:e402:b0:176:8787:92d1 with SMTP id m2-20020a170902e40200b00176878792d1mr6561363ple.157.1662303122453; Sun, 04 Sep 2022 07:52:02 -0700 (PDT) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202208271031.27RAV5RN047637@gitrepo.freebsd.org> In-Reply-To: From: Po-Chuan Hsieh Date: Sun, 4 Sep 2022 22:51:25 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 538a001f90bb - main - archivers/zstd: Change build system from meson to gmake To: Adam Weinberger Cc: ports-committers , dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001f8e5205e7db1bcd" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662303123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yKNWCWWJQw0a9tSwm34Rzo3yqJotV0lx/hNjWbQ6cqM=; b=DD8vsA27LwB09f5AofSbcvH9yux0RZJC2MJXcQUT1JOvTcgDwIgjzIXGBPH6CbhRJnXXwe bUOS4KpoL3UhNpoYuLzeP9JcMgESbCN93Bf+nM3VTGvVOaVgj3UN3oXzCP2MDaPiGt78wm rtAQ0FIdALri2QMEibtIrgzt+JVn/U3vxsjqGZ8ibUb/wRzwG/O0pBmkRdKQHxUBcfDZRo 3zW6Ssd1WV3jMWAJ35Lpe+tyAJhavsHkNlVI3n0ALclgLxUgc10jifTt69yGrk5Xnn2c73 1uNk+n0aFemg/O6jbT4iNPPbob+nnjnnYSdXZYzk7B4ebm+yKHgfAkF0XfdnqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662303123; a=rsa-sha256; cv=none; b=WVS5L4qJgK4YFoSmW0AmK9NxQNTlUM7loJfW0rUbHovWVeqHbl8gduvN7v1P6f44QB7SPD gqUXEX8oRlZBRrIjUpAFAzgHTfzmQLQ81rsvtPG85j8113kofuKj0g6QlW7qlgVRZ0k7cH 4zsERcdbVqGqdLjdkeHrQ5UHkJm3kzBDZky19F3W3QJGaS8HX7yNlFdTYaF64KdFPB9nui h0NzVwMtlFxwDJ+lZWu/uQPYfGDczu2nNtvoHHc2gmHSW1/Gkmqbpk4iWELnfFGe/96Gpk sRMK/ENXeNWhHnkHq9p3FlVAmUuPZP1ya/hFqdElWuPOxyj/bLTLLvKVArUomA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --0000000000001f8e5205e7db1bcd Content-Type: text/plain; charset="UTF-8" On Sun, Aug 28, 2022 at 6:31 PM Adam Weinberger wrote: > > > On Sat, Aug 27, 2022 at 4:31 AM Po-Chuan Hsieh > wrote: > >> The branch main has been updated by sunpoet: >> >> URL: >> https://cgit.FreeBSD.org/ports/commit/?id=538a001f90bbf14b5bdaa556119925699adb1849 >> >> commit 538a001f90bbf14b5bdaa556119925699adb1849 >> Author: Po-Chuan Hsieh >> AuthorDate: 2022-08-27 10:23:30 +0000 >> Commit: Po-Chuan Hsieh >> 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
On Sun, Aug 28, 2022 at 6:31 PM Adam Wein= berger <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://cgi= t.FreeBSD.org/ports/commit/?id=3D538a001f90bbf14b5bdaa556119925699adb1849

commit 538a001f90bbf14b5bdaa556119925699adb1849
Author:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-08-27 10:23:30 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-08-27 10:23:30 +0000

=C2=A0 =C2=A0 archivers/zstd: Change build system from meson to gmake

=C2=A0 =C2=A0 - Use BINARY_ALIAS and remove TEST_DEPENDS: md5sum from base = system works fine
=C2=A0 =C2=A0 - Remove TEST option
=C2=A0 =C2=A0 - Bump PORTREVISION for package change

=C2=A0 =C2=A0 from README.md [1]:
=C2=A0 =C2=A0 make is the officially maintained build system of this projec= t. All other build
=C2=A0 =C2=A0 systems are "compatible" and 3rd-party maintained, = they may feature small
=C2=A0 =C2=A0 differences in advanced options. When your system allows it, = prefer using make
=C2=A0 =C2=A0 to build zstd and libzstd.

=C2=A0 =C2=A0 Reference:=C2=A0 =C2=A0 =C2=A0
https://github.com/facebook/zstd/blob/dev/README.md#build-in= structions [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=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 OPTIMIZED_CFLAGS

-OPTIONS_DEFINE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 LTO LZ4 OPTIMIZED_CFLAGS TEST=
-OPTIONS_DEFAULT=3DLZ4
-
-LTO_MESON_TRUE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b= _lto
-LZ4_LIB_DEPENDS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0liblz4.so:archivers/liblz4 -LZ4_MESON_ENABLED=3D=C2=A0 =C2=A0 =C2=A0lz4
-LZ4_USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 localbase:ldfl= ags
=C2=A0OPTIMIZED_CFLAGS_VARS=3D CFLAGS+=3D-O3
-TEST_MESON_TRUE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0bin_tests

Hi Po-Chuan,

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.
# Adam


--

Hi Adam,

<= div>Did you try adding WITH_LTO=3Dyes in /etc/make.conf (see Mk/Features/lto.mk)? Does it work for you= ?

I did not use LTO myself.
And I&= #39;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.=C2=A0
From my point of view,= it (b_lto) should be added to either=C2=A0Mk/Features/lto.mk or=C2=A0Mk/Uses/meson.mk.


Reg= ards,
sunpoet
--0000000000001f8e5205e7db1bcd--