diff options
author | Jia Tan <jiat0218@gmail.com> | 2024-01-23 18:02:13 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2024-02-01 20:09:11 +0800 |
commit | 2f1552a91c825e87013925e1a67a0930e7aef592 (patch) | |
tree | 3b98f281229423092b44935cae616e966d6d004a /src/liblzma/check/crc64_fast.c | |
parent | Docs: Add --disable-arm64-crc32 description to INSTALL. (diff) | |
download | xz-2f1552a91c825e87013925e1a67a0930e7aef592.tar.xz |
liblzma: Only use ifunc in crcXX_fast.c if its needed.
The code was using HAVE_FUNC_ATTRIBUTE_IFUNC instead of CRC_USE_IFUNC.
With ARM64, ifunc is incompatible because it requires non-inline
function calls for runtime detection.
Diffstat (limited to 'src/liblzma/check/crc64_fast.c')
-rw-r--r-- | src/liblzma/check/crc64_fast.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/check/crc64_fast.c b/src/liblzma/check/crc64_fast.c index d1ab6862..6a4e6d24 100644 --- a/src/liblzma/check/crc64_fast.c +++ b/src/liblzma/check/crc64_fast.c @@ -94,7 +94,7 @@ crc64_generic(const uint8_t *buf, size_t size, uint64_t crc) typedef uint64_t (*crc64_func_type)( const uint8_t *buf, size_t size, uint64_t crc); -#if defined(HAVE_FUNC_ATTRIBUTE_IFUNC) && defined(__clang__) +#if defined(CRC_USE_IFUNC) && defined(__clang__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-function" #endif @@ -106,11 +106,11 @@ crc64_resolve(void) ? &crc64_arch_optimized : &crc64_generic; } -#if defined(HAVE_FUNC_ATTRIBUTE_IFUNC) && defined(__clang__) +#if defined(CRC_USE_IFUNC) && defined(__clang__) # pragma GCC diagnostic pop #endif -#ifndef HAVE_FUNC_ATTRIBUTE_IFUNC +#ifndef CRC_USE_IFUNC #ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR # define CRC64_SET_FUNC_ATTR __attribute__((__constructor__)) |