aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/config/always-compiler-options.m4
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/config/always-compiler-options.m4')
-rw-r--r--sys/contrib/openzfs/config/always-compiler-options.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/config/always-compiler-options.m4 b/sys/contrib/openzfs/config/always-compiler-options.m4
index 37fa079e0f4c..0e96435e3713 100644
--- a/sys/contrib/openzfs/config/always-compiler-options.m4
+++ b/sys/contrib/openzfs/config/always-compiler-options.m4
@@ -210,6 +210,27 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [
])
dnl #
+dnl # Check if cc supports -Wno-atomic-alignment option.
+dnl #
+AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_ATOMIC_ALIGNMENT], [
+ AC_MSG_CHECKING([whether $CC supports -Wno-atomic-alignment])
+
+ saved_flags="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-atomic-alignment"
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
+ NO_ATOMIC_ALIGNMENT=-Wno-atomic-alignment
+ AC_MSG_RESULT([yes])
+ ], [
+ NO_ATOMIC_ALIGNMENT=
+ AC_MSG_RESULT([no])
+ ])
+
+ CFLAGS="$saved_flags"
+ AC_SUBST([NO_ATOMIC_ALIGNMENT])
+])
+
+dnl #
dnl # Check if cc supports -Wimplicit-fallthrough option.
dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [