mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
Fix CONFIG_MODULES=no Linux kernel config
When configuring as builtin (--enable-linux-builtin) for kernels without loadable module support (CONFIG_MODULES=n) only the object file is created. Never a loadable kmod. Update ZFS_LINUX_TRY_COMPILE to handle this in a manor similar to the ZFS_LINUX_TEST_COMPILE_ALL macro. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #9887 Closes #10063
This commit is contained in:
parent
49f065d5a4
commit
13bfad0c96
@ -811,11 +811,20 @@ dnl # $2 - source
|
||||
dnl # $3 - run on success (valid .ko generated)
|
||||
dnl # $4 - run on failure (unable to compile)
|
||||
dnl #
|
||||
dnl # When configuring as builtin (--enable-linux-builtin) for kernels
|
||||
dnl # without loadable module support (CONFIG_MODULES=n) only the object
|
||||
dnl # file is created. See ZFS_LINUX_TEST_COMPILE_ALL for details.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_TRY_COMPILE], [
|
||||
AS_IF([test "x$enable_linux_builtin" = "xyes"], [
|
||||
ZFS_LINUX_COMPILE_IFELSE(
|
||||
[ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]])],
|
||||
[test -f build/conftest/conftest.ko],
|
||||
[$3], [$4])
|
||||
[test -f build/conftest/conftest.o], [$3], [$4])
|
||||
], [
|
||||
ZFS_LINUX_COMPILE_IFELSE(
|
||||
[ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]])],
|
||||
[test -f build/conftest/conftest.ko], [$3], [$4])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
|
Loading…
Reference in New Issue
Block a user