From b7421d7daeb34610deb7b6f53c1a8112afebc441 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 2 Apr 2025 15:06:56 +0400 Subject: [PATCH] Made atomics check work with old compilers In our CI a quite old version of gcc (6.3.0) is used for the aarch64 configs and it was confused by the (previous) code of the test program intended to find out if libatomics must be explicitly passed to the linker. --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 51052335..5e3558fd 100644 --- a/meson.build +++ b/meson.build @@ -22,11 +22,11 @@ atomics_program = ''' using namespace std; int main() { - volatile atomic_bool a_b = true; - volatile atomic_ullong a_ull = -1; + volatile atomic_bool a_b(true); + volatile atomic_ullong a_ull(-1); // Next two lines are to cover atomic from 'httplib.h'. - volatile atomic a_u32 = -1; - volatile atomic a_u64 = -1; + volatile atomic a_u32(-1); + volatile atomic a_u64(-1); return atomic_load(&a_b) == false && atomic_load(&a_ull) == 0 && atomic_load(&a_u32) == 0 && atomic_load(&a_u64) == 0;