diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am index 0aa6c2e468..804efccca0 100644 --- a/cmd/ztest/Makefile.am +++ b/cmd/ztest/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/Rules.am -AM_CFLAGS += $(FRAME_LARGER_THAN) +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) DEFAULT_INCLUDES += \ -I${top_srcdir}/lib/libspl/include \ diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index b274b0d254..d40b6e53c9 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -18,15 +18,18 @@ AC_DEFUN([ZFS_AC_DEBUG], [ [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror" - DEBUG_CFLAGS="-DDEBUG -Werror -fstack-check" + DEBUG_CFLAGS="-DDEBUG -Werror" + DEBUG_STACKFLAGS="-fstack-check" ], [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG " HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG " DEBUG_CFLAGS="-DNDEBUG" + DEBUG_STACKFLAGS="" ]) AC_SUBST(DEBUG_CFLAGS) + AC_SUBST(DEBUG_STACKFLAGS) AC_MSG_RESULT([$enable_debug]) ]) diff --git a/lib/libavl/Makefile.am b/lib/libavl/Makefile.am index 3ae2cb98a7..50185e281f 100644 --- a/lib/libavl/Makefile.am +++ b/lib/libavl/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + DEFAULT_INCLUDES += \ -I${top_srcdir}/module/avl/include \ -I${top_srcdir}/lib/libspl/include diff --git a/lib/libefi/Makefile.am b/lib/libefi/Makefile.am index 79849ad26d..431179340a 100644 --- a/lib/libefi/Makefile.am +++ b/lib/libefi/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + DEFAULT_INCLUDES += \ -I${top_srcdir}/lib/libefi/include \ -I${top_srcdir}/lib/libspl/include diff --git a/lib/libnvpair/Makefile.am b/lib/libnvpair/Makefile.am index 31e0b6a0ce..9cac22c530 100644 --- a/lib/libnvpair/Makefile.am +++ b/lib/libnvpair/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + DEFAULT_INCLUDES += \ -I${top_srcdir}/module/nvpair/include \ -I${top_srcdir}/lib/libnvpair/include \ diff --git a/lib/libunicode/Makefile.am b/lib/libunicode/Makefile.am index fe1f39219f..9d5785595f 100644 --- a/lib/libunicode/Makefile.am +++ b/lib/libunicode/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + DEFAULT_INCLUDES += \ -I${top_srcdir}/module/unicode/include \ -I${top_srcdir}/lib/libspl/include diff --git a/lib/libuutil/Makefile.am b/lib/libuutil/Makefile.am index 78eb75e27f..591c046e3b 100644 --- a/lib/libuutil/Makefile.am +++ b/lib/libuutil/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + DEFAULT_INCLUDES += \ -I${top_srcdir}/lib/libuutil/include \ -I${top_srcdir}/lib/libspl/include \ diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 744dbfce30..8a7fb195f9 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/Rules.am -AM_CFLAGS += $(FRAME_LARGER_THAN) +AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) SUBDIRS = include DEFAULT_INCLUDES += \