mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 19:39:35 +03:00
6f1db5f37e
We already enable -DDEBUG unconditionally (meaning regardless of this is a debug build or a performance build) for zdb and ztest as they are mostly used for development and debugging. This patch enables -DDEBUG for libzpool extending the debugging checks for zdb, ztest, and a couple of other test utilities. In addition to passing -DDEBUG we also enable -DZFS_DEBUG so all assertion checks work s expected. We do so not only in libzpool but in every utility that links to it, even if the utility doesn't directly use any functionality wrapped in ZFS_DEBUG macro definitions. The reason is that these utilities may still include headers that contain structs that have more fields when ZFS_DEBUG is defined. This can be a problem as enabling that flag for libzpool but not for zdb can lead into random problems (e.g. segmentation faults) as zdb may be have an incorrect view of a struct passed to it by libzpool. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #10549
21 lines
461 B
Makefile
21 lines
461 B
Makefile
include $(top_srcdir)/config/Rules.am
|
|
|
|
# Includes kernel code, generate warnings for large stack frames
|
|
AM_CFLAGS += $(FRAME_LARGER_THAN)
|
|
|
|
# Unconditionally enable ASSERTs
|
|
AM_CPPFLAGS += -DDEBUG -UNDEBUG -DZFS_DEBUG
|
|
|
|
bin_PROGRAMS = raidz_test
|
|
|
|
raidz_test_SOURCES = \
|
|
raidz_test.h \
|
|
raidz_test.c \
|
|
raidz_bench.c
|
|
|
|
raidz_test_LDADD = \
|
|
$(abs_top_builddir)/lib/libzpool/libzpool.la \
|
|
$(abs_top_builddir)/lib/libzfs_core/libzfs_core.la
|
|
|
|
raidz_test_LDADD += -lm
|