mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
Fix atomic-alignment warnings in libspl on FreeBSD/i386
On i386, Clang complains about misaligned atomic operations. Silence these warnings to fix the build on FreeBSD/i386. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alan Somers <asomers@gmail.com> Sponsored by: ConnectWise Closes #17708
This commit is contained in:
committed by
Brian Behlendorf
parent
15a6b982c5
commit
9c6f72021d
@@ -209,6 +209,27 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [
|
||||
AC_SUBST([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 #
|
||||
|
||||
Reference in New Issue
Block a user