Closed vadorovsky closed 7 months ago
It looks like clang will start to reject these x86-specific flags when building for other architectures in a future release. https://github.com/llvm/llvm-project/issues/64632
I've made the -m
flags conditional for x86_64, so this should fix compilation on aarch64 but I haven't verified that yet.
Verified in OBS, aarch64 builds.
@kdave, I think the patch unintentionally disables SSE2/etc. for x86_64 targets as well. Did you intend to use the following?
if test "x$target_cpu" == 'xx86_64'; then
Ah right, thanks. The "x$variable" is the most backward compatible test that's recommended for configure but apparently it's easy to make a typo. Fixed in devel.
Building btrfs-progs with clang and lld (16) fails with the following linker errors:
That's because the following checks:
https://github.com/kdave/btrfs-progs/blob/afa23d4e279ad24027269d6ca5309f894e6daa87/configure.ac#L48-L62
are insufficient for clang. Clang, unlike GCC, typically accepts unknown or unsupported
-m
options without error, simple ignoring them if they don't apply to the target architecture.