Closed rathann closed 1 month ago
meson has no support for file-specific compiler flags, but this patch seems to work around the issue for me (all 2002 tests succeed):
diff -up simde-0.8.2/test/meson.build.orig simde-0.8.2/test/meson.build
--- simde-0.8.2/test/meson.build.orig 2024-04-30 16:35:50.000000000 +0000
+++ simde-0.8.2/test/meson.build 2024-08-30 11:22:14.428728668 +0000
@@ -58,6 +58,10 @@ if cxx.get_id() == 'intel'
simde_native_cxx_flags += '-DSIMDE_FAST_MATH'
endif
+if target_machine.cpu_family() == 'aarch64' and cc.get_id() == 'clang'
+ simde_native_c_flags += '-mcrc'
+endif
+
if not c_openmp_simd
simde_deps += dependency('openmp', required: false)
endif
Hello @rathann and thank you for sharing your issue.
Not all aarch64 CPUs have the crc32 feature, so we shouldn't enable it universally.
I will open a PR that avoids using the crc32 feature unless it is already enabled.
Alas, it looks like -march=native
doesn't enable crc32
automatically on many processors. You may need to use -march=armv8-a+crc
or similar
See https://stackoverflow.com/questions/45625725/does-clang-lack-crc32-for-armv8-aarch64 and https://stackoverflow.com/questions/37066261/why-is-arm-feature-crc32-not-being-defined-by-the-compiler
Hello @rathann and thank you for sharing your issue.
Hi! You're welcome! I'm always happy to work with upstreams on the issues we catch downstream in Fedora.
Not all aarch64 CPUs have the crc32 feature, so we shouldn't enable it universally.
I see.
I will open a PR that avoids using the crc32 feature unless it is already enabled.
Great, thanks! I'll test it as soon as I can.
Alas, it looks like
-march=native
doesn't enablecrc32
automatically on many processors. You may need to use-march=armv8-a+crc
or similar
Interesting. Thanks for the links.
When building simde-0.8.2 with clang-18.1.8 on Fedora rawhide on aarch64, I'm getting the following error: