Skip to content

Commit

Permalink
Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk
Browse files Browse the repository at this point in the history
  • Loading branch information
behlendorf committed Jul 14, 2010
2 parents d1f7e73 + dccff58 commit 7cb1dca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
2 changes: 1 addition & 1 deletion config/Rules.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DEFAULT_INCLUDES = -include ${top_srcdir}/zfs_config.h

AM_LIBTOOLFLAGS = --silent
AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -Werror
AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing ${DEBUG_CFLAGS}
AM_CFLAGS += -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT
AM_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64
AM_CFLAGS += -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\"
2 changes: 1 addition & 1 deletion config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other
dnl # compiler options are added by the kernel build system.
KERNELCPPFLAGS="$KERNELCPPFLAGS -Werror -DHAVE_SPL -D_KERNEL"
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$SPL"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$SPL/include"
Expand Down
41 changes: 17 additions & 24 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,26 @@ AC_DEFUN([ZFS_AC_LICENSE], [

AC_DEFUN([ZFS_AC_DEBUG], [
AC_MSG_CHECKING([whether debugging is enabled])
AC_ARG_ENABLE( [debug],
AS_HELP_STRING([--enable-debug],
[Enable generic debug support (default off)]),
[ case "$enableval" in
yes) zfs_ac_debug=yes ;;
no) zfs_ac_debug=no ;;
*) AC_MSG_RESULT([Error!])
AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;;
esac ]
)
if test "$zfs_ac_debug" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE([DEBUG], [1],
[Define to 1 to enable debug tracing])
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG "
USERDEBUG="-DDEBUG -fstack-check"
else
AC_MSG_RESULT([no])
AC_DEFINE([NDEBUG], [1],
[Define to 1 to disable debug tracing])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[Enable generic debug support @<:@default=no@:>@])],
[],
[enable_debug=no])
AS_IF([test "x$enable_debug" = xyes],
[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror -fstack-check"
],
[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
USERDEBUG="-DNDEBUG"
fi
DEBUG_CFLAGS="-DNDEBUG"
])
AC_SUBST(USERDEBUG)
AC_SUBST(DEBUG_CFLAGS)
AC_MSG_RESULT([$enable_debug])
])

AC_DEFUN([ZFS_AC_CONFIG_SCRIPT], [
Expand Down

0 comments on commit 7cb1dca

Please sign in to comment.