mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-28 17:39:23 +03:00
Update build system and packaging
Minimal changes required to integrate the SPL sources in to the
ZFS repository build infrastructure and packaging.
Build system and packaging:
* Renamed SPL_* autoconf m4 macros to ZFS_*.
* Removed redundant SPL_* autoconf m4 macros.
* Updated the RPM spec files to remove SPL package dependency.
* The zfs package obsoletes the spl package, and the zfs-kmod
package obsoletes the spl-kmod package.
* The zfs-kmod-devel* packages were updated to add compatibility
symlinks under /usr/src/spl-x.y.z until all dependent packages
can be updated. They will be removed in a future release.
* Updated copy-builtin script for in-kernel builds.
* Updated DKMS package to include the spl.ko.
* Updated stale AUTHORS file to include all contributors.
* Updated stale COPYRIGHT and included the SPL as an exception.
* Renamed README.markdown to README.md
* Renamed OPENSOLARIS.LICENSE to LICENSE.
* Renamed DISCLAIMER to NOTICE.
Required code changes:
* Removed redundant HAVE_SPL macro.
* Removed _BOOT from nvpairs since it doesn't apply for Linux.
* Initial header cleanup (removal of empty headers, refactoring).
* Remove SPL repository clone/build from zimport.sh.
* Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due
to build issues when forcing C99 compilation.
* Replaced legacy ACCESS_ONCE with READ_ONCE.
* Include needed headers for `current` and `EXPORT_SYMBOL`.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
TEST_ZIMPORT_SKIP="yes"
Closes #7556
This commit is contained in:
+59
-3
@@ -95,6 +95,63 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [
|
||||
AC_MSG_RESULT([$enable_debuginfo])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Disabled by default, provides basic memory tracking. Track the total
|
||||
dnl # number of bytes allocated with kmem_alloc() and freed with kmem_free().
|
||||
dnl # Then at module unload time if any bytes were leaked it will be reported
|
||||
dnl # on the console.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_DEBUG_KMEM], [
|
||||
AC_MSG_CHECKING([whether basic kmem accounting is enabled])
|
||||
AC_ARG_ENABLE([debug-kmem],
|
||||
[AS_HELP_STRING([--enable-debug-kmem],
|
||||
[Enable basic kmem accounting @<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_debug_kmem=no])
|
||||
|
||||
AS_IF([test "x$enable_debug_kmem" = xyes], [
|
||||
KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM"
|
||||
DEBUG_KMEM_ZFS="_with_debug_kmem"
|
||||
], [
|
||||
DEBUG_KMEM_ZFS="_without_debug_kmem"
|
||||
])
|
||||
|
||||
AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
|
||||
AC_SUBST(DEBUG_KMEM_ZFS)
|
||||
|
||||
AC_MSG_RESULT([$enable_debug_kmem])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Disabled by default, provides detailed memory tracking. This feature
|
||||
dnl # also requires --enable-debug-kmem to be set. When enabled not only will
|
||||
dnl # total bytes be tracked but also the location of every kmem_alloc() and
|
||||
dnl # kmem_free(). When the module is unloaded a list of all leaked addresses
|
||||
dnl # and where they were allocated will be dumped to the console. Enabling
|
||||
dnl # this feature has a significant impact on performance but it makes finding
|
||||
dnl # memory leaks straight forward.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
|
||||
AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
|
||||
AC_ARG_ENABLE([debug-kmem-tracking],
|
||||
[AS_HELP_STRING([--enable-debug-kmem-tracking],
|
||||
[Enable detailed kmem tracking @<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_debug_kmem_tracking=no])
|
||||
|
||||
AS_IF([test "x$enable_debug_kmem_tracking" = xyes], [
|
||||
KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM_TRACKING"
|
||||
DEBUG_KMEM_TRACKING_ZFS="_with_debug_kmem_tracking"
|
||||
], [
|
||||
DEBUG_KMEM_TRACKING_ZFS="_without_debug_kmem_tracking"
|
||||
])
|
||||
|
||||
AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
|
||||
AC_SUBST(DEBUG_KMEM_TRACKING_ZFS)
|
||||
|
||||
AC_MSG_RESULT([$enable_debug_kmem_tracking])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE
|
||||
@@ -183,10 +240,11 @@ AC_DEFUN([ZFS_AC_RPM], [
|
||||
])
|
||||
|
||||
RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
|
||||
RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_ZFS) 1"'
|
||||
RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
|
||||
RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
|
||||
RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
|
||||
|
||||
|
||||
RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
|
||||
|
||||
dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
|
||||
@@ -221,8 +279,6 @@ AC_DEFUN([ZFS_AC_RPM], [
|
||||
])
|
||||
|
||||
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
|
||||
RPM_DEFINE_KMOD+=' --define "require_spldir $(SPL)"'
|
||||
RPM_DEFINE_KMOD+=' --define "require_splobj $(SPL_OBJ)"'
|
||||
RPM_DEFINE_KMOD+=' --define "ksrc $(LINUX)"'
|
||||
RPM_DEFINE_KMOD+=' --define "kobj $(LINUX_OBJ)"'
|
||||
RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
|
||||
|
||||
Reference in New Issue
Block a user