Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions config/toolchain-cfi.m4
Original file line number Diff line number Diff line change
@@ -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
])
1 change: 1 addition & 0 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

#if defined(__aarch64__)

/* make gcc <= 9 happy */
#if !defined(LD_VERSION) || LD_VERSION >= 233010000
/* check for .cfi_negate_ra_state assembler support */
#if defined(HAVE_AS_CFI_PSEUDO_OP)
#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
#else
#define CFI_NEGATE_RA_STATE
Expand Down
4 changes: 2 additions & 2 deletions module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

#if defined(__aarch64__)

/* make gcc <= 9 happy */
#if !defined(LD_VERSION) || LD_VERSION >= 233010000
/* check for .cfi_negate_ra_state assembler support */
#if defined(HAVE_AS_CFI_PSEUDO_OP)
#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
#else
#define CFI_NEGATE_RA_STATE
Expand Down
Loading