xz/m4
Lasse Collin c690101ddd
tuklib_integer: Autodetect when -mstrict-align is used with GCC on ARM64
On ARM64, support for fast unaligned memory access was autodetected by
checking if __ARM_FEATURE_UNALIGNED is defined. However, at least GCC
versions up to 15.2.0 define the macro even when -mstrict-align has
been specified. Thus, autodetection with GCC doesn't work correctly,
and binaries built using -mstrict-align can be much slower than they
need to be, unless the user also passes --disable-unaligned-access
to configure or -DTUKLIB_FAST_UNALIGNED_ACCESS=OFF to cmake.

See the GCC bug:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

Workaround the issue by using heuristics with GCC on ARM64.

With Clang, the detection using __ARM_FEATURE_UNALIGNED works.
It also works with GCC on 32-bit ARM.

Fixes: e5f13a6656 ("tuklib_integer: Autodetect support for unaligned access on ARM.")
2025-12-16 11:34:10 +02:00
..
.gitignore Update m4/.gitignore. 2024-02-15 22:26:43 +08:00
ax_pthread.m4 Add SPDX license identifiers to GPL, LGPL, and FSFULLR files. 2024-02-14 18:31:16 +02:00
getopt.m4 m4/getopt.m4: Remove an outdated comment 2025-02-17 18:25:52 +02:00
posix-shell.m4 Build: Update posix-shell.m4 from Gnulib 2025-02-02 14:30:19 +02:00
tuklib_common.m4 Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
tuklib_cpucores.m4 Build: Use AC_LINK_IFELSE to handle implicit function declarations 2024-06-26 15:48:56 +03:00
tuklib_integer.m4 tuklib_integer: Autodetect when -mstrict-align is used with GCC on ARM64 2025-12-16 11:34:10 +02:00
tuklib_mbstr.m4 Add tuklib_mbstr_wrap for automatic word wrapping 2024-12-18 17:09:31 +02:00
tuklib_physmem.m4 Build: Use AC_LINK_IFELSE to handle implicit function declarations 2024-06-26 15:48:56 +03:00
tuklib_progname.m4 Add SPDX license identifier into 0BSD source code files. 2024-02-14 18:31:16 +02:00
visibility.m4 Build: Update visibility.m4 from Gnulib 2024-05-07 16:21:15 +03:00