From nobody Sat Jul 09 05:03:34 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 A6B8B3E5F41; Sat, 9 Jul 2022 05:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lfyj30Glfz3NK8; Sat, 9 Jul 2022 05:03:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657343015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePoI/PSCraj7iAv1iuEpMOGxmecv1SZdLqp6Af00pic=; b=KbDjS17vKSunrV72KB/MLK6lKl9HJtDJ2psQidC2PP7HF2mSMuBeOZ++ZLNpYWe2o2DMsa yTn6oQCVYoq3s+oImrDXkKhIAAurqj24E6V+hFo/L90V9yPXUo4MmIT0zpjbjMBqmdHwax 5UHrUhl9HW/TfKZdVKXXJIC+79eM9/IhpUKTYPKRB2qn4Xze8R4rKJvIp+ZYTAFjCdnMBh uMINueJ3UhK5kEGGyThhS9DbEsH4TAy5vs5upSXD0pIC2jELPk2pp4EgKKIhUsBskILnpc lXTu2fYI2bnNvdzr0klpEJ4iCzxUOSUBRWl9O3o7xFgmZjKPOOr9UdmF+FHMmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lfyj26CnkzZHN; Sat, 9 Jul 2022 05:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26953YxP000157; Sat, 9 Jul 2022 05:03:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26953YnM000156; Sat, 9 Jul 2022 05:03:34 GMT (envelope-from git) Date: Sat, 9 Jul 2022 05:03:34 GMT Message-Id: <202207090503.26953YnM000156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4773d3425e62 - main - stand: Add comments on ZFS build 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4773d3425e62bda14f0dd91c4e3de5009dba388f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657343015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePoI/PSCraj7iAv1iuEpMOGxmecv1SZdLqp6Af00pic=; b=Vws4BzUhwTCVVyfQJGEF1dLYpI4aOYp2DdbrhzEutO4fVCXtXZseZh8DYCu2cM5ZLv3dUg fGqL91hqQTURpUMqGnJLBKAP59oiJqE9mbgkjTuP/hrI+zUjnQ2zNpZy7s8cCqYMcRyGm+ uiMr7iNNPtz01vaMb/+H2FUnY53Rbi4BvBzZJh0rBD0IKfB+9/IySRyjseWTBELnWHouQQ fqDxT8ssVBOhJOdEU/phkHgJngMD/AahpN26r0TlI4THGFF5n08pDgfJHgO53Nim5Enwno WA+PszTN91EYG6XwGZTS8GEaunXuSiocTES6K9tvWHvVqxcicXMH4P9wbmlVTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657343015; a=rsa-sha256; cv=none; b=AT9J6SDFNgE1lhXI8MmRQortb3u5alJmq8ZMOoGDxmiOw1ND6YGy66/D+lwq49Tyrdv3ed P/d+2C4q3Xc5+mbrtLUneDnqRoeX9V7elYnnGWc7+SyfZleMM+pgja0vrzizjW61CCcPZ8 eZMuFW37s1NS8CdLRz3CpE5R0hY7aVLee0ESlrofN+aufh+zJZMfWf1vGIZE8tlzgp2YVx KVEORU0Hz/2UqaBYwrViyicGQb1I3xudz1TIOLBwtBVg5BXoEFm0CR7/wy54trqh3GlPr2 vaJwrc5Cs91TSlHTVsu6oqLEL9yaQRrNosYDlQItlN8X1LAZc/H+zECJhUkoyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4773d3425e62bda14f0dd91c4e3de5009dba388f commit 4773d3425e62bda14f0dd91c4e3de5009dba388f Author: Warner Losh AuthorDate: 2022-07-08 23:35:11 +0000 Commit: Warner Losh CommitDate: 2022-07-09 05:01:59 +0000 stand: Add comments on ZFS build Add comments describing the weird nesting things we have to do to live inside the ZFS world. Also fix a stale comment by moving nvlist.c to an early user. Sponsored by: Netflix --- stand/libsa/zfs/Makefile.inc | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 314f74c903f1..9de1a1f00c24 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -27,11 +27,27 @@ CFLAGS+= -I${LDRSRC} CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/crypto/skein +# +# Any file that needs the FreeBSD overrides that are in +# include/os/freebssd/spl/XXX needs to have these added to +# CFLAGS_EARLY.file.c. In general, we try to build out of the OpenZFS tree +# unaltered. There's a problem, though, that since we're building for a +# standalone environment that's neither userland nor kernel, we sometimes need +# special code and that's handled by the 'nested' includes where we either setup +# something just-so before we include the include/XXX file, or if we need to +# tweak something defined in that file. +# + ZFS_EARLY= -I${ZFSSRC}/spl \ -I${ZFSOSINC} \ -I${ZFSOSINC}/spl \ -I${ZFSOSINC}/zfs +# +# For all files, though, we prepend the sys/ccompile.h file to the build which +# has a bunch of defines that are present in OpenSolaris / Illumos, but missing +# from FreeBSD. +# .for i in ${ZFS_SRC} ${ZSTD_SRC} CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/include \ -DNEED_SOLARIS_BOOLEAN @@ -42,11 +58,12 @@ CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} CFLAGS_EARLY.list.c+= ${ZFS_EARLY} CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY} +CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY} # Can't use the early flags because there's two conflicting definitions of boolean_t in -# the zfs code that need to be unified. -CFLAGS.nvlist.c+= -I${ZFSOSINC}/spl -CFLAGS.zfs.c+= -I${ZFSOSINC}/spl \ +# the zfs code that need to be unified, as well as a number of other hacks for pre-openzfs +# code still in the tree that needs to be fixed. +CFLAGS.zfs.c+= -I${ZFSOSINC}/spl \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 \ -I${ZFSOSINC}/zfs \ -I${OZFS}/include