Peter Hessler:

> :http://build-failures.rhaalovely.net/aarch64/2023-08-25/emulators/mame.log
> 
> fatal error: error in backend: Cannot select: intrinsic %llvm.aarch64.crc32b

I looked at this error when it first appeared.  The underlying
problem is this:

            #define ATTRIB_CRC __attribute__((__target__("arch=armv8-a+crc")))
                                                         ^
../../../../../3rdparty/lzma/C/7zCrc.c:160:1: warning: unknown architecture 
'armv8-a+crc' in the 'target' attribute string; 'target' attribute ignored 
[-Wignored-attributes]

MAME has imported a new revision of the LZMA SDK, which tries to
use special CRC instructions on aarch64 as an optimization.  Apparently,
this doesn't work with clang.

FreeBSD has patches to fix the build on aarch64 and armv7, but after
looking them over, I was not convinced that they were correct or
even that the upstream LZMA code does what it is intended to do.
The idea seems to be to build alternative code paths with and without
CRC extensions and pick the right one at runtime, depending on
what's available on the CPU.  The logic didn't look right to me,
though.  Then again, I may have misunderstood it.

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to