mirror of https://git.tukaani.org/xz.git
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:
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| ax_pthread.m4 | ||
| getopt.m4 | ||
| posix-shell.m4 | ||
| tuklib_common.m4 | ||
| tuklib_cpucores.m4 | ||
| tuklib_integer.m4 | ||
| tuklib_mbstr.m4 | ||
| tuklib_physmem.m4 | ||
| tuklib_progname.m4 | ||
| visibility.m4 | ||