mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Make CONFIG_PREEMPT Fatal
Until support is added for preemptible kernels detect this at configure time and make it fatal. Otherwise, it is possible to have a successful build and kernel modules with flakey behavior.
This commit is contained in:
parent
47995fa691
commit
7731d46b69
@ -8,6 +8,7 @@
|
||||
|
||||
AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_KERNEL
|
||||
SPL_AC_KERNEL_CONFIG
|
||||
|
||||
if test "${LINUX_OBJ}" != "${LINUX}"; then
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||
@ -190,6 +191,13 @@ AC_DEFUN([SPL_AC_KERNEL], [
|
||||
SPL_AC_MODULE_SYMVERS
|
||||
])
|
||||
|
||||
AC_DEFUN([SPL_AC_KERNEL_CONFIG], [
|
||||
SPL_LINUX_CONFIG([PREEMPT],
|
||||
AC_MSG_ERROR([
|
||||
*** Kernel built with CONFIG_PREEMPT which is not supported.
|
||||
** You must rebuild your kernel without this option.]), [])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Explicitly check for gawk, we require it for the the usermode
|
||||
dnl # helper. For some reason the standard awk command does not
|
||||
|
146
configure
vendored
146
configure
vendored
@ -11793,6 +11793,79 @@ $as_echo "$LINUX_SYMBOLS" >&6; }
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
|
||||
$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.c
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
#ifndef AUTOCONF_INCLUDED
|
||||
#include <linux/config.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
#ifndef CONFIG_PREEMPT
|
||||
#error CONFIG_PREEMPT not #defined
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
||||
|
||||
rm -Rf build && mkdir -p build
|
||||
echo "obj-m := conftest.o" >build/Makefile
|
||||
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
{ { $as_echo "$as_me:$LINENO: error:
|
||||
*** Kernel built with CONFIG_PREEMPT which is not supported.
|
||||
** You must rebuild your kernel without this option." >&5
|
||||
$as_echo "$as_me: error:
|
||||
*** Kernel built with CONFIG_PREEMPT which is not supported.
|
||||
** You must rebuild your kernel without this option." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -Rf build
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "${LINUX_OBJ}" != "${LINUX}"; then
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||
fi
|
||||
@ -15528,6 +15601,79 @@ $as_echo "$LINUX_SYMBOLS" >&6; }
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
|
||||
$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.c
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
#ifndef AUTOCONF_INCLUDED
|
||||
#include <linux/config.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
#ifndef CONFIG_PREEMPT
|
||||
#error CONFIG_PREEMPT not #defined
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
||||
|
||||
rm -Rf build && mkdir -p build
|
||||
echo "obj-m := conftest.o" >build/Makefile
|
||||
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
{ { $as_echo "$as_me:$LINENO: error:
|
||||
*** Kernel built with CONFIG_PREEMPT which is not supported.
|
||||
** You must rebuild your kernel without this option." >&5
|
||||
$as_echo "$as_me: error:
|
||||
*** Kernel built with CONFIG_PREEMPT which is not supported.
|
||||
** You must rebuild your kernel without this option." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -Rf build
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "${LINUX_OBJ}" != "${LINUX}"; then
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user