From 369293803b4350e95c99feb3bc265c03f412e375 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 09:45:23 -0800 Subject: [PATCH 1/2] Allow recursive configure/make Previously the ZFS configure was dependent on a correct Module{s}.symvers file which is generated as one of the last steps of the full SPL build. This meant you could not do a recursive configure because this will configure all sub-packages before building any of them. To resolve this issue the ZFS code has been updated to make a very educated guess as to this file name at configure time. This means SPL_SYMBOLS may still be used in various places in the build system such as modules/Makefile.in. But we do give up the ability to seemlessly detect symbols exported by the SPL at ZFS configure time. At the moment this is not as issue, hopefully it will stay that way. --- config/kernel.m4 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config/kernel.m4 b/config/kernel.m4 index 302ba1f435..95c5942540 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -42,7 +42,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ]) dnl # -dnl # Detect name used more Module.symvers file +dnl # Detect name used for Module.symvers file in kernel dnl # AC_DEFUN([ZFS_AC_MODULE_SYMVERS], [ modpost=$LINUX/scripts/Makefile.modpost @@ -153,7 +153,14 @@ AC_DEFUN([ZFS_AC_KERNEL], [ ]) dnl # -dnl # Detect name used for the additional SPL Module.symvers file +dnl # Detect name used for the additional SPL Module.symvers file. If one +dnl # does not exist this is likely because the SPL has been configured +dnl # but not built. To allow recursive builds a good guess is made as to +dnl # what this file will be named based on what it is named in the kernel +dnl # build products. This file will first be used at link time so if +dnl # the guess is wrong the build will fail then. This unfortunately +dnl # means the ZFS package does not contain a reliable mechanism to +dnl # detect symbols exported by the SPL at configure time. dnl # AC_DEFUN([ZFS_AC_SPL_MODULE_SYMVERS], [ AC_MSG_CHECKING([spl file name for module symbols]) @@ -162,7 +169,7 @@ AC_DEFUN([ZFS_AC_SPL_MODULE_SYMVERS], [ elif test -r $SPL_OBJ/Modules.symvers; then SPL_SYMBOLS=Modules.symvers else - SPL_SYMBOLS=NONE + SPL_SYMBOLS=$LINUX_SYMBOLS fi AC_MSG_RESULT([$SPL_SYMBOLS]) @@ -353,7 +360,7 @@ dnl # AC_DEFUN([ZFS_CHECK_SYMBOL_EXPORT], [AC_MSG_CHECKING([whether symbol $1 is exported]) grep -q -E '[[[:space:]]]$1[[[:space:]]]' \ - $LINUX_OBJ/Module*.symvers $SPL_OBJ/Module*.symvers 2>/dev/null + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null rc=$? if test $rc -ne 0; then export=0 From 414f1f975e5c8ac0e9a399e992e46f517ab59828 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 09:53:59 -0800 Subject: [PATCH 2/2] Rename update-zfs.sh -> zfs-update.sh for consistency --- scripts/{update-zfs.sh => zfs-update.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{update-zfs.sh => zfs-update.sh} (100%) diff --git a/scripts/update-zfs.sh b/scripts/zfs-update.sh similarity index 100% rename from scripts/update-zfs.sh rename to scripts/zfs-update.sh