aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/Makefile.am
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-04-14 11:36:28 -0700
committerGitHub <[email protected]>2020-04-14 11:36:28 -0700
commit9f0a21e6411aa0bac23fba0ddb220342a48c7cc7 (patch)
tree63e77f57396f27dbe5c69dc11e7aeb37f9008bfc /lib/libzfs/Makefile.am
parent75c62019f3938e7bc81becb4fb2d5b5eb523e79a (diff)
Add FreeBSD support to OpenZFS
Add the FreeBSD platform code to the OpenZFS repository. As of this commit the source can be compiled and tested on FreeBSD 11 and 12. Subsequent commits are now required to compile on FreeBSD and Linux. Additionally, they must pass the ZFS Test Suite on FreeBSD which is being run by the CI. As of this commit 1230 tests pass on FreeBSD and there are no unexpected failures. Reviewed-by: Sean Eric Fagan <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #898 Closes #8987
Diffstat (limited to 'lib/libzfs/Makefile.am')
-rw-r--r--lib/libzfs/Makefile.am15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am
index 2747a7e9b..0e1e0a53e 100644
--- a/lib/libzfs/Makefile.am
+++ b/lib/libzfs/Makefile.am
@@ -27,6 +27,15 @@ USER_C = \
libzfs_status.c \
libzfs_util.c
+
+if BUILD_FREEBSD
+USER_C += \
+ os/freebsd/libzfs_fsshare.c \
+ os/freebsd/libzfs_compat.c \
+ os/freebsd/libzfs_ioctl_compat.c \
+ os/freebsd/libzfs_zmount.c
+endif
+
if BUILD_LINUX
USER_C += \
os/linux/libzfs_mount_os.c \
@@ -35,7 +44,6 @@ USER_C += \
os/linux/libzfs_util_os.c
endif
-
KERNEL_C = \
algs/sha2/sha2.c \
cityhash.c \
@@ -70,7 +78,12 @@ libzfs_la_LIBADD += \
$(top_builddir)/lib/libshare/libshare.la
endif
+if BUILD_FREEBSD
+libzfs_la_LIBADD += -lutil -lgeom
+libzfs_la_LDFLAGS = -version-info 4:0:0
+else
libzfs_la_LDFLAGS = -version-info 2:0:0
+endif
libzfs_la_LIBADD += -lm $(LIBSSL)