From 0d0677705690c27acd17f152c020a941935f249d Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 5 Feb 2023 12:56:24 -0500 Subject: [PATCH] [PATCH] build/cmake: Link libatomic where needed for 64-bit atomic ops. From 9155a8401d79a69a68052e3c8145da1187240d20 Mon Sep 17 00:00:00 2001 Forwarded: https://github.com/savoirfairelinux/opendht/pull/653 Last-Update: 2023-02-05 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. Gbp-Pq: Name 1000-cmake-fix-no-atomic-64.patch --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e434bb..3869af4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,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 () -- 2.30.2