summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-09-19 13:35:03 -0700
committerBrian Behlendorf <[email protected]>2011-09-19 13:45:08 -0700
commit97fd6a07c2c2fd1d27fc79938eb1a451c92fbfc4 (patch)
tree8d8afb547e2cd16384849a56579092db802769fb /config
parentc064bdee95583102e216354bbdece4818d59b644 (diff)
Fix HAVE_FS_STRUCT_SPINLOCK check for gcc-4.1.2
Older versions of gcc (gcc-4.1.2) will treat an 'incompatible pointer type' as a warning instead of an error. This results in HAVE_FS_STRUCT_SPINLOCK being defined incorrectly. This failure mode was observed when using a RHEL6 2.6.32 based kernel under RHEL5.5 which contains the old version of gcc. To resolve the issue the warning is explicitly promoted to an error. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index f4652bce1..c046db830 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -1598,6 +1598,8 @@ dnl # a spinlock_t to improve the fastpath performance.
dnl #
AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Werror"
SPL_LINUX_TRY_COMPILE([
#include <linux/sched.h>
#include <linux/fs_struct.h>
@@ -1611,6 +1613,7 @@ AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
],[
AC_MSG_RESULT(no)
])
+ EXTRA_KCFLAGS="$tmp_flags"
])
dnl #