From nobody Wed Jul 20 18:05:33 2022 X-Original-To: dev-commits-src-all@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 4Lp3XT6B7rz4WZfq for ; Wed, 20 Jul 2022 18:05:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) (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 4Lp3XT3pgZz3CYX for ; Wed, 20 Jul 2022 18:05:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe32.google.com with SMTP id x125so16965170vsb.13 for ; Wed, 20 Jul 2022 11:05:45 -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=IxgR2JIE/bay14Wuyi9J0SMzybwY6jG1k5gy19BI880=; b=GPlVTXFFCi+sr8v/R7Irxv1l1aes0yO1mv2IhfG3Iad9wGW6OKVbH1IpEanTmBb1dk 4LMhh6xyCqoQoVcjw484ITyq/TjAC5CEMZHTA7FXacbxGffjJC9b77DxsCy/eXv8rW1N vLBS0wgFca4QwXmNTpWKWOF1fzeEqUs05cRfGd1te4G6HCvY5sEDki19tI+6gy0DIB6F 2JYLtTQpBmNhZDjk2qpyN544JSQ5G7bPOD53t2W0135/KOuRjmBc/1X212Cv1CzEDAPa IV9e4L/FeOQg+vCKpxbXnyVMqrgFL/P6x6iYG+k/xBJ+MA7GBF6F/hcr8nLl/EtfWgSw OBgQ== 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=IxgR2JIE/bay14Wuyi9J0SMzybwY6jG1k5gy19BI880=; b=TF9KIJm5em2bIM0WrfJPJsqFk7/cP/XLkRvwKXJVLfI2yT1Gz+NbvaKIvZYlvj57i7 NQ10PxwWrgp4mXexDnEd6C4VTz9Vq9k/IJZhM0myYnvVaHCSYngB54sT0qEVzdRcZXuE 9HeJ0oaPztet3r4uQA4uOOHYY67hnta3jfz16Vmys8mS0r44ZJp5Dd2gBXa5GZzp5m3a DvNR3U2axJompg4KKyX0lM5CNob6hQZC0ydIPusclbkZGE3/rZJK2jSeNzB7CrvDJYmX Wulxd4ZKUwPj4P8tSTcviKoycHbLsxdLH4du/9Qdq9jCif3WhOPYg/w6a6Os+HxhU4Ad YYzw== X-Gm-Message-State: AJIora9RYiJvMJEGfDPqbMyuW5MCLZmoENZGLOrx7zAD/gETsgNt9Qkb Yzm6A/NDgmT7APv8PYG26hN1iuSql7oPRyV0ALvcgw== X-Google-Smtp-Source: AGRyM1sgnAX2GerWioAm7u7zSbZaEORnNyXBz5O25YoQRehluQfkOKLgovO6UivHrb4FeGLoNPwjekidpNNEZVXDtcs= X-Received: by 2002:a67:e9cf:0:b0:357:6d9e:d2fb with SMTP id q15-20020a67e9cf000000b003576d9ed2fbmr13373210vso.41.1658340344651; Wed, 20 Jul 2022 11:05:44 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202207081750.268Ho5kZ066824@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 20 Jul 2022 12:05:33 -0600 Message-ID: Subject: Re: git: 84bf2bbbecc3 - main - stand: constrain zlib/gzip CFLAGS better To: Dmitry Chagin Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000028ffd305e4407372" X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4Lp3XT3pgZz3CYX X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000028ffd305e4407372 Content-Type: text/plain; charset="UTF-8" Yea, I know. I proposed a change to jhb when he spotted this yesterday. The problem is that the universe building tool didn't build w/o boot. The problem is that anything at all uses stand/common as its include path. I'll fix that bigger problem later. And ZFS shouldn't unconditionally include CFLAGS, but should only do it for ZFS files. I'll fix that later. Warner On Wed, Jul 20, 2022 at 11:24 AM 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 > > > > > > +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 > --00000000000028ffd305e4407372 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yea, I know. I proposed a change to jhb when he spotted th= is yesterday.

The problem is that the universe building = tool didn't build w/o boot.

The problem is tha= t anything at all uses stand/common as its include path. I'll fix that = bigger problem later.

And ZFS shouldn't uncond= itionally include CFLAGS, but should only do it for ZFS files. I'll fix= that later.

Warner

On Wed, Jul 20= , 2022 at 11:24 AM 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: https://= cgit.FreeBSD.org/src/commit/?id=3D84bf2bbbecc369cea6095bed7a738674b27f8d13<= /a>
>
> 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 =C2=A0stand: constrain zlib/gzip CFLAGS better
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Define ZLIB_CFLAGS and use it only for the sources = that are in ZLIB or
>=C2=A0 =C2=A0 =C2=A0that include it.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
> ---
>=C2=A0 stand/libsa/Makefile | 13 +++++++------
>=C2=A0 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}
>=C2=A0
>=C2=A0 # decompression functionality from zlib
>=C2=A0 .PATH: ${SRCTOP}/sys/contrib/zlib
> -CFLAGS+=3D-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0adler32.c crc32.c
> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0infback.c inffast.c inflate.c inft= rees.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 inftrees.c = zutil.c
> +CFLAGS.${i}+=3D${ZLIB_CFLAGS}
> +SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0${i}
> +.endfor
>=C2=A0
>=C2=A0 # lz4 decompression functionality
>=C2=A0 .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
> @@ -168,9 +170,8 @@ SRCS+=3D=C2=A0 =C2=A0 time.c
>=C2=A0 .PATH: ${SRCTOP}/sys/ufs/ffs
>=C2=A0 SRCS+=3Dffs_subr.c ffs_tables.c
>=C2=A0
> -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




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