mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix check for .cfi_negate_ra_state on aarch64
Checking for LD_VERSION in unreliable as not all distros define it on the compiler's preprocessor. Explicitly check it via autoconf. This fixes support for Ubuntu 18.04 on arm64. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Juhyung Park <qkrwngud825@gmail.com> Closes #18262
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Check whether assembler supports .cfi_negate_ra_state on AArch64.
|
||||
dnl #
|
||||
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_CFI_PSEUDO_OP], [
|
||||
case "$host_cpu" in
|
||||
aarch64*)
|
||||
AC_CACHE_CHECK([whether assembler supports .cfi_negate_ra_state],
|
||||
[zfs_cv_as_cfi_pseudo_op], [
|
||||
cat > conftest.S <<_ACEOF
|
||||
.text
|
||||
conftest:
|
||||
.cfi_startproc
|
||||
.cfi_negate_ra_state
|
||||
ret
|
||||
.cfi_endproc
|
||||
_ACEOF
|
||||
if AC_TRY_COMMAND([$CC -c $CFLAGS $CPPFLAGS conftest.S -o conftest.o]) >/dev/null 2>&1; then
|
||||
zfs_cv_as_cfi_pseudo_op=yes
|
||||
else
|
||||
zfs_cv_as_cfi_pseudo_op=no
|
||||
fi
|
||||
rm -f conftest.S conftest.o
|
||||
])
|
||||
|
||||
AS_IF([test "x$zfs_cv_as_cfi_pseudo_op" = xyes], [
|
||||
AC_DEFINE([HAVE_AS_CFI_PSEUDO_OP], 1,
|
||||
[Define if your assembler supports .cfi_negate_ra_state.])
|
||||
])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
@@ -266,6 +266,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_ASAN
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_UBSAN
|
||||
ZFS_AC_TOOLCHAIN_SIMD
|
||||
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_CFI_PSEUDO_OP
|
||||
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
||||
ZFS_AC_CONFIG_ALWAYS_ARCH
|
||||
ZFS_AC_CONFIG_CHECK_ARCH_VAR
|
||||
|
||||
Reference in New Issue
Block a user