From 4592663fd2f65003559ab50af3113bc587974a0a Mon Sep 17 00:00:00 2001 From: Amin Bandali <amin.bandali@savoirfairelinux.com> Date: Sun, 5 Feb 2023 12:56:24 -0500 Subject: [PATCH] build/cmake: Link libatomic where needed for 64-bit atomic ops. Link against libatomic also on architectures that need it for 64-bit atomic operations. ARM EABI (armel) and little-endian MIPS (mipsel) are two such architectures. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a488de6..40143f3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,9 @@ set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED on) # Dependencies -if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB) +if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB + # For ARM EABI (armel), little-endian MIPS (mipsel), etc. + OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) link_libraries (atomic) endif () -- GitLab