config: gcc != cc

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13145
Closes #13152
This commit is contained in:
наб 2022-02-25 20:50:09 +01:00 committed by Brian Behlendorf
parent b08153f1c1
commit 9e532d17f3
1 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
dnl # dnl #
dnl # Enabled -fsanitize=address if supported by gcc. dnl # Enabled -fsanitize=address if supported by $CC.
dnl # dnl #
dnl # LDFLAGS needs -fsanitize=address at all times so libraries compiled with dnl # LDFLAGS needs -fsanitize=address at all times so libraries compiled with
dnl # it will be linked successfully. CFLAGS will vary by binary being built. dnl # it will be linked successfully. CFLAGS will vary by binary being built.
@ -46,7 +46,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_ASAN], [
]) ])
dnl # dnl #
dnl # Enabled -fsanitize=undefined if supported by gcc. dnl # Enabled -fsanitize=undefined if supported by cc.
dnl # dnl #
dnl # LDFLAGS needs -fsanitize=undefined at all times so libraries compiled with dnl # LDFLAGS needs -fsanitize=undefined at all times so libraries compiled with
dnl # it will be linked successfully. CFLAGS will vary by binary being built. dnl # it will be linked successfully. CFLAGS will vary by binary being built.
@ -93,7 +93,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_UBSAN], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wframe-larger-than=<size> option. dnl # Check if cc supports -Wframe-larger-than=<size> option.
dnl # dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN], [ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN], [
AC_MSG_CHECKING([whether $CC supports -Wframe-larger-than=<size>]) AC_MSG_CHECKING([whether $CC supports -Wframe-larger-than=<size>])
@ -114,7 +114,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wno-format-truncation option. dnl # Check if cc supports -Wno-format-truncation option.
dnl # dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION], [ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION], [
AC_MSG_CHECKING([whether $CC supports -Wno-format-truncation]) AC_MSG_CHECKING([whether $CC supports -Wno-format-truncation])
@ -135,7 +135,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wno-format-zero-length option. dnl # Check if cc supports -Wno-format-zero-length option.
dnl # dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [
AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length]) AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length])
@ -156,9 +156,9 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wno-clobbered option. dnl # Check if cc supports -Wno-clobbered option.
dnl # dnl #
dnl # We actually invoke gcc with the -Wclobbered option dnl # We actually invoke it with the -Wclobbered option
dnl # and infer the 'no-' version does or doesn't exist based upon 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 # the results. This is required because when checking any of
dnl # no- prefixed options gcc always returns success. dnl # no- prefixed options gcc always returns success.
@ -182,9 +182,9 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wno-cast-function-type option. dnl # Check if cc supports -Wno-cast-function-type option.
dnl # dnl #
dnl # We actually invoke gcc with the --cast-function-type option dnl # We actually invoke it with the --cast-function-type option
dnl # and infer the 'no-' version does or doesn't exist based upon 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 # the results. This is required because when checking any of
dnl # no- prefixed options gcc always returns success. dnl # no- prefixed options gcc always returns success.
@ -208,7 +208,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CAST_FUNCTION_TYPE], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -Wimplicit-fallthrough option. dnl # Check if cc supports -Wimplicit-fallthrough option.
dnl # dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [
AC_MSG_CHECKING([whether $CC supports -Wimplicit-fallthrough]) AC_MSG_CHECKING([whether $CC supports -Wimplicit-fallthrough])
@ -231,7 +231,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [
]) ])
dnl # dnl #
dnl # Check if gcc supports -fno-omit-frame-pointer option. dnl # Check if cc supports -fno-omit-frame-pointer option.
dnl # dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [
AC_MSG_CHECKING([whether $CC supports -fno-omit-frame-pointer]) AC_MSG_CHECKING([whether $CC supports -fno-omit-frame-pointer])