diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 8088ef497d46..f565683fba4e 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,58 +1,46 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/include LIB= spl LIBADD= PACKAGE= runtime SRCS = \ assert.c \ + getexecname.c \ list.c \ mkdirp.c \ + os/freebsd/getexecname.c \ + os/freebsd/zone.c \ page.c \ timestamp.c \ - zone.c \ include/sys/list.h \ include/sys/list_impl.h # These functions are not required when bootstrapping and the atomic code # will not compile when building on macOS. .if !defined(BOOTSTRAPPING) SRCS += \ - getexecname.c \ - gethostid.c \ - getmntany.c \ - mnttab.c - - -.if ${MACHINE_ARCH} == "amd64" -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-x86_64 -SRCS += atomic.S -.elif ${MACHINE_ARCH} == "i386" -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-i386 -SRCS += atomic.S -.else -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-generic -SRCS += atomic.c -.endif + atomic.c \ + os/freebsd/gethostid.c \ + os/freebsd/getmntany.c \ + os/freebsd/mnttab.c .endif - WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS.atomic.S+= -DLOCORE +CFLAGS.atomic.c+= -Wno-error-atomic-alignment .include diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 76567b50c610..169b8d8afe01 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -1,29 +1,27 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil PACKAGE= runtime LIB= uutil SRCS=\ uu_alloc.c \ uu_avl.c \ - uu_dprintf.c \ uu_ident.c \ uu_list.c \ uu_misc.c \ - uu_open.c \ uu_pname.c \ uu_string.c WARNS?= 2 CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h LIBADD= avl spl .include diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index b159955c0212..6de09d1b7333 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -1,110 +1,109 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/include .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib PACKAGE= runtime LIB= zfs LIBADD= \ avl \ bsdxml \ crypto \ geom \ m \ md \ nvpair \ pthread \ umem \ util \ uutil \ z \ zfs_core \ zutil INCS= libzfs.h USER_C = \ libzfs_changelist.c \ libzfs_config.c \ libzfs_crypto.c \ libzfs_dataset.c \ libzfs_diff.c \ libzfs_import.c \ libzfs_iter.c \ libzfs_mount.c \ libzfs_pool.c \ libzfs_sendrecv.c \ libzfs_status.c \ libzfs_util.c # FreeBSD USER_C += \ libzfs_compat.c \ libzfs_ioctl_compat.c \ libzfs_zmount.c # libshare USER_C += \ libshare.c \ nfs.c \ - smb.c - + os/freebsd/nfs.c \ + os/freebsd/smb.c KERNEL_C = \ algs/sha2/sha2.c \ cityhash.c \ zfeature_common.c \ zfs_comutil.c \ zfs_deleg.c \ zfs_fletcher.c \ zfs_fletcher_superscalar.c \ zfs_fletcher_superscalar4.c \ zfs_namecheck.c \ zfs_prop.c \ zpool_prop.c \ zprop_common.c ARCH_C = .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" ARCH_C += zfs_fletcher_intel.c \ zfs_fletcher_sse.c CFLAGS += -DHAVE_SSE2 .endif .if ${MACHINE_ARCH} == "amd64" ARCH_C += zfs_fletcher_avx512.c CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F .endif .if ${MACHINE_CPUARCH} == "aarch64" ARCH_C += zfs_fletcher_aarch64_neon.c .endif SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) WARNS?= 2 SHLIB_MAJOR= 4 CSTD= c99 CFLAGS+= -DIN_BASE CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h CFLAGS+= -DSYSCONFDIR=\"/etc\" CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" .include diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index 5c2595df1c9f..10d55215c0b3 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -1,25 +1,23 @@ # $FreeBSD$ .include SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ ${_zinject} \ ${_zstream} \ - ${_zstreamdump} \ ${_ztest} SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _zinject= zinject _ztest= ztest _zstream = zstream -_zstreamdump = zstreamdump .endif SUBDIR_PARALLEL= .include diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index d6ac8c5f3b16..ac3bfeb68cf4 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -1,32 +1,35 @@ # $FreeBSD$ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zstream .PATH: ${ZFSTOP}/man/man8 PROG= zstream MAN= zstream.8 +MLINKS= zstream.8 zstreamdump.8 INCS= zstream.h SRCS= \ zstream.c \ zstream_dump.c \ zstream_redup.c \ zstream_token.c +LINKS= ${BINDIR}/zstream ${BINDIR}/zstreamdump + WARNS?= 2 CFLAGS+= \ -DIN_BASE \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID \ -include ${SRCTOP}/sys/modules/zfs/zfs_config.h LIBADD= geom m nvpair umem uutil avl spl zfs_core zfs zutil zpool .include diff --git a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile deleted file mode 100644 index 63f365d0445a..000000000000 --- a/cddl/usr.bin/zstreamdump/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - -.PATH: ${ZFSTOP}/cmd/zstreamdump -.PATH: ${ZFSTOP}/man/man8 - -SCRIPTS= zstreamdump -MAN= zstreamdump.8 - -.include diff --git a/cddl/usr.bin/zstreamdump/Makefile.depend b/cddl/usr.bin/zstreamdump/Makefile.depend deleted file mode 100644 index 3089536f9717..000000000000 --- a/cddl/usr.bin/zstreamdump/Makefile.depend +++ /dev/null @@ -1,25 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - cddl/lib/libavl \ - cddl/lib/libnvpair \ - cddl/lib/libumem \ - cddl/lib/libzpool \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libmd \ - lib/libthr \ - lib/libz \ - lib/msun \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index d1fab41578bf..50a8f8f56fb2 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -1,70 +1,71 @@ # $FreeBSD$ SHLIBDIR?= /lib .include PACKAGE= runtime LIB= be SHLIB_MAJOR= 1 SHLIB_MINOR= 0 SRCS= be.c be_access.c be_error.c be_info.c INCS= be.h MAN= libbe.3 MLINKS+= libbe.3 be_activate.3 MLINKS+= libbe.3 be_active_name.3 MLINKS+= libbe.3 be_active_path.3 MLINKS+= libbe.3 be_create_depth.3 MLINKS+= libbe.3 be_create_from_existing_snap.3 MLINKS+= libbe.3 be_create_from_existing.3 MLINKS+= libbe.3 be_create.3 MLINKS+= libbe.3 be_deactivate.3 MLINKS+= libbe.3 be_destroy.3 MLINKS+= libbe.3 be_exists.3 MLINKS+= libbe.3 be_export.3 MLINKS+= libbe.3 be_get_bootenv_props.3 MLINKS+= libbe.3 be_get_dataset_props.3 MLINKS+= libbe.3 be_get_dataset_snapshots.3 MLINKS+= libbe.3 be_import.3 MLINKS+= libbe.3 be_is_auto_snapshot_name.3 MLINKS+= libbe.3 be_mount.3 MLINKS+= libbe.3 be_mounted_at.3 MLINKS+= libbe.3 be_nextboot_name.3 MLINKS+= libbe.3 be_nextboot_path.3 MLINKS+= libbe.3 be_nicenum.3 MLINKS+= libbe.3 be_prop_list_alloc.3 MLINKS+= libbe.3 be_prop_list_free.3 MLINKS+= libbe.3 be_rename.3 MLINKS+= libbe.3 be_root_concat.3 MLINKS+= libbe.3 be_root_path.3 MLINKS+= libbe.3 be_snapshot.3 MLINKS+= libbe.3 be_unmount.3 MLINKS+= libbe.3 be_validate_name.3 MLINKS+= libbe.3 be_validate_snap.3 MLINKS+= libbe.3 libbe_close.3 MLINKS+= libbe.3 libbe_errno.3 MLINKS+= libbe.3 libbe_error_description.3 MLINKS+= libbe.3 libbe_init.3 MLINKS+= libbe.3 libbe_print_on_error.3 LIBADD+= zfs LIBADD+= nvpair LIBADD+= spl LIBADD+= zfsbootenv CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID HAS_TESTS= YES SUBDIR.${MK_TESTS}+= tests .include