From 8981fb5a18ae15f664b27fde437dce3e17030874 Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Fri, 12 Sep 2025 21:40:23 +0200 Subject: [PATCH] meson: only require libatomic if the test program doesn't link 95448347 made lix require libatomic if the platform is able to link a simple program using atomics, but it should actually be the other way around. We need to require libatomic if it fails. Change-Id: I6a6a6964ca6ee90a59314ddf1865753e83713772 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7b229ccef..bede78a64 100644 --- a/meson.build +++ b/meson.build @@ -396,7 +396,7 @@ libatomic = dependency('atomic', required : false) # Some platforms like 32-Bit PowerPC need libatomic because they're lacking 64-Bit hardware atomic instructions # and compilers don't handle this automatically (yet). # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 and https://clang.llvm.org/docs/Toolchain.html#atomics-library -if cxx.links(libatomic_test_program, name : 'test if simple atomic program links') +if not cxx.links(libatomic_test_program, name : 'test if simple atomic program links') libatomic = dependency('atomic', required : true) endif