diff options
author | наб <[email protected]> | 2022-02-16 16:06:08 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-02-18 09:34:25 -0800 |
commit | 72154bd6c9b352fe9f2d9a48c4d45211edd56823 (patch) | |
tree | 03546ccb20cf3ea8819ba4364192a4d20939b9f1 /config/always-compiler-options.m4 | |
parent | 0ea6510aa006dc88f91fa5f666bfe8943eda4a24 (diff) |
libtpool: -Wno-clobbered
Also remove -Wno-unused-but-set-variable
Upstream-bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61118
Reviewed-by: Alejandro Colomar <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13110
Diffstat (limited to 'config/always-compiler-options.m4')
-rw-r--r-- | config/always-compiler-options.m4 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/config/always-compiler-options.m4 b/config/always-compiler-options.m4 index 82b351c6e..4b19b52bd 100644 --- a/config/always-compiler-options.m4 +++ b/config/always-compiler-options.m4 @@ -135,7 +135,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION], [ ]) dnl # -dnl # Check if gcc supports -Wno-format-truncation option. +dnl # Check if gcc supports -Wno-format-zero-length option. dnl # AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [ AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length]) @@ -183,29 +183,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE], [ ]) dnl # -dnl # Check if gcc supports -Wno-unused-but-set-variable option. +dnl # Check if gcc supports -Wno-clobbered option. dnl # -dnl # We actually invoke gcc with the -Wunused-but-set-variable option +dnl # We actually invoke gcc with the -Wclobbered option dnl # and infer the 'no-' version does or doesn't exist based upon dnl # the results. This is required because when checking any of dnl # no- prefixed options gcc always returns success. dnl # -AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE], [ - AC_MSG_CHECKING([whether $CC supports -Wno-unused-but-set-variable]) +AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [ + AC_MSG_CHECKING([whether $CC supports -Wno-clobbered]) saved_flags="$CFLAGS" - CFLAGS="$CFLAGS -Werror -Wunused-but-set-variable" + CFLAGS="$CFLAGS -Werror -Wclobbered" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ - NO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable + NO_CLOBBERED=-Wno-clobbered AC_MSG_RESULT([yes]) ], [ - NO_UNUSED_BUT_SET_VARIABLE= + NO_CLOBBERED= AC_MSG_RESULT([no]) ]) CFLAGS="$saved_flags" - AC_SUBST([NO_UNUSED_BUT_SET_VARIABLE]) + AC_SUBST([NO_CLOBBERED]) ]) dnl # |