From: Amin Bandali Date: Sun, 5 Feb 2023 17:56:24 +0000 (-0500) Subject: [PATCH] build/cmake: Link libatomic where needed for 64-bit atomic ops. X-Git-Tag: archive/raspbian/3.0.1-1.1+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b98dffee7b0621b5178f4776391d8f835d7b0d23;p=opendht.git [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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 13bb1b3..11482d9 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 ()