From nobody Wed Jul 20 18:20:08 2022 X-Original-To: dev-commits-src-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 4Lp3sK1Mwhz4Wbm2 for ; Wed, 20 Jul 2022 18:20:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) (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)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lp3sJ4PZmz3FNG for ; Wed, 20 Jul 2022 18:20:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe31.google.com with SMTP id t127so17079763vsb.8 for ; Wed, 20 Jul 2022 11:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rmo+/i7j1Pw3C3jB/Gd7XRVyjFNFcqkc6BKVOlhemiE=; b=xTQHezIN9rnPD8sY2F3RYAWEiR4SO3/XK5EG8gwgKRCaryx9BCwI7+RhGJL2C1Ti6V GkGjYt0Z7UltL8M4D27ikjEMRhCIua+xdswqhLXUMwzE16mCKv0f9js8inDoIVU1FL+5 FPQy8V39Zcr8/+3rrnTZUv+3fmDrbpH3O/qm7Bx1JnuZnn1w9Uz+FFiWt1DfU17kBB4M YvHgQX2Jp0IYChauwtHZPWsHbOczdzcXQw2YISjj7i1zzhu9Z7Bi61E5zNiEEBV8JIOf OeaErC6smG9aycKiQQm2LW+LsM3Z3/FwFxa+qdDcYnIB3YA94HKrQdTZCSRkf8njqWpl bTOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rmo+/i7j1Pw3C3jB/Gd7XRVyjFNFcqkc6BKVOlhemiE=; b=Zh5MZMBujISFe5k9jghhe1z4o57bByvHhL5nManYsImGILNq7sNaYMzwCdAAiyyTOW PWzybU0yIWgf/8pMLcxJrgTCL6Ykt9vXHV6sDN9JfihVsh1jkjSZTQ6rhfz570gjOBH0 SPfoXZ0hxAxOWaiK4UdIh0Og9q0I1uMWMSnkeQfBmvWB1tPiR6YuTy7mCr77GYk6vEvg oRYxTLh0FA0jfzCxKaiIf8cY7QbkExGMEoDJJfLbqF0zFMfzlp95u199LDMALj8u989y M60EnyGsIeAKcAitSDX6y0qfLTwvsvF1C/zkqzMNKzRPCq/Dtx4V7Q1onvoH+6aamKYO /WzQ== X-Gm-Message-State: AJIora/JHX5MkHgP/MdYQrXXxoaZU531hZQTdkYddi7fScaEAVJ5IPQP u19MpvBBjbbEDUKRTUgEjo4ZpqXq3CeRow+REnC1Pg== X-Google-Smtp-Source: AGRyM1sXu7y70eY9qcoxPVsB1cJE3grf9G6MNYqzVO7yIfO/JFpYRdt/syvH9dG8rPFTDCsMtlSOwh+2MQ/tJIuU4Xc= X-Received: by 2002:a05:6102:346:b0:357:79f5:63ae with SMTP id e6-20020a056102034600b0035779f563aemr14845314vsa.40.1658341220020; Wed, 20 Jul 2022 11:20:20 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202207081750.268Ho5kZ066824@gitrepo.freebsd.org> <244CD526-C7D0-4D42-9DAB-6EA690DFD3A7@me.com> In-Reply-To: From: Warner Losh Date: Wed, 20 Jul 2022 12:20:08 -0600 Message-ID: Subject: Re: git: 84bf2bbbecc3 - main - stand: constrain zlib/gzip CFLAGS better To: Toomas Soome Cc: Dmitry Chagin , Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000056056705e440a765" X-Rspamd-Queue-Id: 4Lp3sJ4PZmz3FNG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=xTQHezIN; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e31) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_TO(0.00)[me.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e31:from]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000056056705e440a765 Content-Type: text/plain; charset="UTF-8" On Wed, Jul 20, 2022 at 12:12 PM Warner Losh wrote: > > > On Wed, Jul 20, 2022 at 12:06 PM Warner Losh wrote: > >> >> >> On Wed, Jul 20, 2022 at 11:44 AM Toomas Soome wrote: >> >>> >>> >>> > On 20. Jul 2022, at 20:24, Dmitry Chagin >>> wrote: >>> > >>> > On Fri, Jul 08, 2022 at 05:50:05PM +0000, Warner Losh wrote: >>> >> The branch main has been updated by imp: >>> >> >>> >> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=84bf2bbbecc369cea6095bed7a738674b27f8d13 >>> >> >>> >> commit 84bf2bbbecc369cea6095bed7a738674b27f8d13 >>> >> Author: Warner Losh >>> >> AuthorDate: 2022-07-08 16:29:25 +0000 >>> >> Commit: Warner Losh >>> >> CommitDate: 2022-07-08 17:47:37 +0000 >>> >> >>> >> stand: constrain zlib/gzip CFLAGS better >>> >> >>> >> Define ZLIB_CFLAGS and use it only for the sources that are in >>> ZLIB or >>> >> that include it. >>> >> >>> >> Sponsored by: Netflix >>> >> --- >>> >> stand/libsa/Makefile | 13 +++++++------ >>> >> 1 file changed, 7 insertions(+), 6 deletions(-) >>> >> >>> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >>> >> index b5d800c26295..09637bd5e9d4 100644 >>> >> --- a/stand/libsa/Makefile >>> >> +++ b/stand/libsa/Makefile >>> >> @@ -96,9 +96,11 @@ SRCS+=${i} >>> >> >>> >> # decompression functionality from zlib >>> >> .PATH: ${SRCTOP}/sys/contrib/zlib >>> >> -CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib >>> >> -SRCS+= adler32.c crc32.c >>> >> -SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c >>> >> +ZLIB_CFLAGS=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib >>> >> +.for i in adler32.c crc32.c infback.c inffast.c inflate.c inftrees.c >>> zutil.c >>> >> +CFLAGS.${i}+=${ZLIB_CFLAGS} >>> >> +SRCS+= ${i} >>> >> +.endfor >>> >> >>> >> # lz4 decompression functionality >>> >> .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 >>> >> @@ -168,9 +170,8 @@ SRCS+= time.c >>> >> .PATH: ${SRCTOP}/sys/ufs/ffs >>> >> SRCS+=ffs_subr.c ffs_tables.c >>> >> >>> >> -CFLAGS.dosfs.c+= -I${LDRSRC} >>> >> -CFLAGS.tftp.c+= -I${LDRSRC} >>> >> -CFLAGS.ufs.c+= -I${LDRSRC} >>> > ^^^^^^^^^^^^ is this correct? at least it breaks builds with >>> > WITHOUT_LOADER_ZFS and WITHOUT_BOOT probably, see PR/260083 >>> > >>> > >>> >>> No, it is not correct. >>> >> >> My change is correct, theoretically. However, there's a layering >> violation that means they are needed so it was premature. >> >> I'll fix a bandaide and do it better when I return from vacation. >> > > Doh! I don't have the right keys loaded in my ssh-agent, so I can't push > the change because the port forwarding on my router is broken and I can't > remotely login :( > > If someone could commit the change I suggested in > https://reviews.freebsd.org/D35860 that would be great! > The changes were needed, btw, to limit the scope of CFLAGS for the OpenZFS blake3.c support. However, this one scope limiting shouldn't break that. Warner > Warner > > >> Warner >> >> >>> rgds, >>> toomas >>> >>> >>> > >>> > >>> >> +CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS} >>> >> +CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS} >>> >> CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO >>> -DBZ_NO_COMPRESS >>> >> >>> >> # explicit_bzero and calculate_crc32c >>> >>> --00000000000056056705e440a765 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jul 20, 2022 at 12:12 PM Warn= er Losh <imp@bsdimp.com> wrote:=


On Wed, Jul 20, 2022 at 12:06 PM Warner Losh <imp@bsdimp.com> wro= te:


On Wed, Jul 20, 2022 at 11:44 AM Toomas Soome <= ;tsoome@me.com> w= rote:


> On 20. Jul 2022, at 20:24, Dmitry Chagin <dchagin@heemeyer.club>= wrote:
>
> On Fri, Jul 08, 2022 at 05:50:05PM +0000, Warner Losh wrote:
>> The branch main has been updated by imp:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3D84bf2bbbecc369cea6095bed7a738674b27f8= d13
>>
>> commit 84bf2bbbecc369cea6095bed7a738674b27f8d13
>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> AuthorDate: 2022-07-08 16:29:25 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> CommitDate: 2022-07-08 17:47:37 +0000
>>
>>=C2=A0 =C2=A0 stand: constrain zlib/gzip CFLAGS better
>>
>>=C2=A0 =C2=A0 Define ZLIB_CFLAGS and use it only for the sources th= at are in ZLIB or
>>=C2=A0 =C2=A0 that include it.
>>
>>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
>> ---
>> stand/libsa/Makefile | 13 +++++++------
>> 1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
>> index b5d800c26295..09637bd5e9d4 100644
>> --- a/stand/libsa/Makefile
>> +++ b/stand/libsa/Makefile
>> @@ -96,9 +96,11 @@ SRCS+=3D${i}
>>
>> # decompression functionality from zlib
>> .PATH: ${SRCTOP}/sys/contrib/zlib
>> -CFLAGS+=3D-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
>> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 adler32.c crc32.c
>> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 infback.c inffast.c inflate.c inftre= es.c zutil.c
>> +ZLIB_CFLAGS=3D-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
>> +.for i in adler32.c crc32.c infback.c inffast.c inflate.c inftree= s.c zutil.c
>> +CFLAGS.${i}+=3D${ZLIB_CFLAGS}
>> +SRCS+=3D=C2=A0 =C2=A0 =C2=A0 ${i}
>> +.endfor
>>
>> # lz4 decompression functionality
>> .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
>> @@ -168,9 +170,8 @@ SRCS+=3D=C2=A0 =C2=A0time.c
>> .PATH: ${SRCTOP}/sys/ufs/ffs
>> SRCS+=3Dffs_subr.c ffs_tables.c
>>
>> -CFLAGS.dosfs.c+=3D -I${LDRSRC}
>> -CFLAGS.tftp.c+=3D -I${LDRSRC}
>> -CFLAGS.ufs.c+=3D -I${LDRSRC}
> ^^^^^^^^^^^^ is this correct? at least it breaks builds with
> WITHOUT_LOADER_ZFS and WITHOUT_BOOT probably, see PR/260083
>
>

No, it is not correct.

My change is cor= rect, theoretically. However, there's a layering violation that means t= hey are needed so it was premature.

I'll fix a= bandaide=C2=A0and do it better when I return from vacation.

Doh! I don't have the right keys lo= aded in my ssh-agent, so I can't push the change because the port forwa= rding on my router is broken and I can't remotely login :(
If someone could commit the change I suggested in=C2=A0https://reviews.f= reebsd.org/D35860 that would be great!

The changes were needed, btw, to limit the scope of CFLAG= S for the OpenZFS blake3.c support. However, this one scope limiting should= n't break that.

Warner
=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Warner
=C2=A0
Warner
=C2=A0
rgds,
toomas


>
>
>> +CFLAGS.gzipfs.c+=3D ${ZLIB_CFLAGS}
>> +CFLAGS.pkgfs.c+=3D ${ZLIB_CFLAGS}
>> CFLAGS.bzipfs.c+=3D -I${SRCTOP}/contrib/bzip2=C2=A0 -DBZ_NO_STDIO = -DBZ_NO_COMPRESS
>>
>> # explicit_bzero and calculate_crc32c

--00000000000056056705e440a765--