From: Ceph Maintainers Date: Tue, 19 Feb 2019 07:50:12 +0000 (+0000) Subject: libatomic X-Git-Tag: archive/raspbian/12.2.11+dfsg1-2+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5749dd1a28fc9c9bb71f50f0d5a19111a23eac3a;p=ceph.git libatomic Gbp-Pq: Name libatomic.patch --- diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake new file mode 100644 index 000000000..67fde83fb --- /dev/null +++ b/cmake/modules/CheckAtomic.cmake @@ -0,0 +1,67 @@ +# Checks if atomic operations are supported natively or if linking against +# libatomic is needed. + +# Check inspired by LLVMs cmake/modules/CheckAtomic.cmake + +INCLUDE(CheckCXXSourceCompiles) +INCLUDE(CheckLibraryExists) + +function(check_working_cxx_atomics varname) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11") + CHECK_CXX_SOURCE_COMPILES(" +#include +std::atomic x; +int main() { + return x; +} +" ${varname}) + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) +endfunction(check_working_cxx_atomics) + +function(check_working_cxx_atomics64 varname) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}") + CHECK_CXX_SOURCE_COMPILES(" +#include +#include +std::atomic x (0); +int main() { + uint64_t i = x.load(std::memory_order_relaxed); + return 0; +} +" ${varname}) + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) +endfunction(check_working_cxx_atomics64) + +# Check if atomics work without libatomic +check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB) + +if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB) + check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC) + if( HAVE_LIBATOMIC ) + list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") + check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB) + if (NOT HAVE_CXX_ATOMICS_WITH_LIB) + message(FATAL_ERROR "Host compiler must support std::atomic!") + endif() + else() + message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.") + endif() +endif() + +# Check if 64bit atomics work without libatomic +check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB) + +if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) + check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64) + if(HAVE_CXX_LIBATOMICS64) + list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") + check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB) + if (NOT HAVE_CXX_ATOMICS64_WITH_LIB) + message(FATAL_ERROR "Host compiler must support std::atomic!") + endif() + else() + message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.") + endif() +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b0837ab1d..465f9cb12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -158,6 +158,12 @@ else() set(C_STANDARD_REQUIRED ON) endif() +# check if linking against libatomic is necessary +include(CheckAtomic) +if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) + set(ATOMIC_LIBRARIES atomic) +endif() + ## Handle diagnostics color if compiler supports them. CHECK_C_COMPILER_FLAG("-fdiagnostics-color=always" COMPILER_SUPPORTS_DIAGNOSTICS_COLOR) @@ -655,10 +661,10 @@ if(HAVE_ARMV8_CRC) endif(HAVE_ARMV8_CRC) add_library(common STATIC ${ceph_common_objs}) -target_link_libraries(common ${ceph_common_deps}) +target_link_libraries(common ${ceph_common_deps} ${ATOMIC_LIBRARIES}) add_library(ceph-common SHARED ${ceph_common_objs}) -target_link_libraries(ceph-common ${ceph_common_deps}) +target_link_libraries(ceph-common ${ceph_common_deps} ${ATOMIC_LIBRARIES}) # appease dpkg-shlibdeps set_target_properties(ceph-common PROPERTIES SOVERSION 0 @@ -867,7 +873,7 @@ if (NOT WITH_SYSTEM_ROCKSDB) add_library(rocksdb STATIC IMPORTED) add_dependencies(rocksdb rocksdb_ext) set_property(TARGET rocksdb PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rocksdb/librocksdb.a") - set(ROCKSDB_LIBRARIES rocksdb) + set(ROCKSDB_LIBRARIES rocksdb ${ATOMIC_LIBRARIES}) endif(NOT WITH_SYSTEM_ROCKSDB) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 8897ada7b..94bc99e15 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -10,4 +10,4 @@ set(libclient_srcs posix_acl.cc Delegation.cc) add_library(client STATIC ${libclient_srcs}) -target_link_libraries(client osdc) +target_link_libraries(client osdc ${ATOMIC_LIBRARIES}) diff --git a/src/dmclock/sim/src/CMakeLists.txt b/src/dmclock/sim/src/CMakeLists.txt index 426827b03..c268c1953 100644 --- a/src/dmclock/sim/src/CMakeLists.txt +++ b/src/dmclock/sim/src/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(ssched_sim dmc_sim add_dependencies(dmc_sim dmclock) -target_link_libraries(ssched_sim LINK_PRIVATE pthread) -target_link_libraries(dmc_sim LINK_PRIVATE pthread $) +target_link_libraries(ssched_sim LINK_PRIVATE pthread ${ATOMIC_LIBRARIES}) +target_link_libraries(dmc_sim LINK_PRIVATE pthread $ ${ATOMIC_LIBRARIES}) add_custom_target(dmclock-sims DEPENDS ssched_sim dmc_sim) diff --git a/src/dmclock/test/CMakeLists.txt b/src/dmclock/test/CMakeLists.txt index aff35d5d7..b8e7983a3 100644 --- a/src/dmclock/test/CMakeLists.txt +++ b/src/dmclock/test/CMakeLists.txt @@ -28,10 +28,15 @@ if (TARGET gtest AND TARGET gtest_main) LINK_PRIVATE $ pthread $ - $) + $ + ${ATOMICS_LIBRARIES}) else() target_link_libraries(dmclock-tests - LINK_PRIVATE $ pthread ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) + LINK_PRIVATE $ + pthread + ${GTEST_LIBRARIES} + ${GTEST_MAIN_LIBRARIES} + ${ATMOIC_LIBRARIES}) endif() add_dependencies(dmclock-tests dmclock) diff --git a/src/journal/CMakeLists.txt b/src/journal/CMakeLists.txt index 3632c1051..414f8600c 100644 --- a/src/journal/CMakeLists.txt +++ b/src/journal/CMakeLists.txt @@ -11,4 +11,4 @@ set(journal_srcs ObjectRecorder.cc Utils.cc) add_library(journal STATIC ${journal_srcs}) -target_link_libraries(journal cls_journal_client) +target_link_libraries(journal cls_journal_client ${ATOMIC_LIBRARIES}) diff --git a/src/kv/CMakeLists.txt b/src/kv/CMakeLists.txt index 0b3ad2223..517654977 100644 --- a/src/kv/CMakeLists.txt +++ b/src/kv/CMakeLists.txt @@ -13,7 +13,7 @@ add_library(kv_objs OBJECT ${kv_srcs}) add_library(kv STATIC $) target_include_directories(kv_objs BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR}) target_include_directories(kv BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR}) -target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${ALLOC_LIBS} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES}) +target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${ATOMIC_LIBRARIES} ${ALLOC_LIBS} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES}) # rocksdb detects bzlib and lz4 in its Makefile, which forces us to do the same. find_package(BZip2 QUIET) diff --git a/src/librados/CMakeLists.txt b/src/librados/CMakeLists.txt index e9e402400..f6e163798 100644 --- a/src/librados/CMakeLists.txt +++ b/src/librados/CMakeLists.txt @@ -9,7 +9,7 @@ add_library(rados_a STATIC $ $) target_link_libraries(rados_a osdc ceph-common cls_lock_client - ${BLKID_LIBRARIES} ${CRYPTO_LIBS} ${EXTRALIBS}) + ${BLKID_LIBRARIES} ${CRYPTO_LIBS} ${EXTRALIBS} ${ATOMIC_LIBRARIES}) if(WITH_LTTNG) add_dependencies(librados_api_obj librados-tp) endif() @@ -20,7 +20,7 @@ if(ENABLE_SHARED) $) # LINK_PRIVATE instead of PRIVATE is used to backward compatibility with cmake 2.8.11 target_link_libraries(librados LINK_PRIVATE osdc ceph-common cls_lock_client - ${BLKID_LIBRARIES} ${CRYPTO_LIBS} ${EXTRALIBS}) + ${BLKID_LIBRARIES} ${CRYPTO_LIBS} ${EXTRALIBS} ${ATOMIC_LIBRARIES}) set_target_properties(librados PROPERTIES OUTPUT_NAME rados VERSION 2.0.0 diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index 072eaed49..65e961f44 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -125,7 +125,8 @@ target_link_libraries(librbd LINK_PRIVATE ceph-common pthread ${CMAKE_DL_LIBS} - ${EXTRALIBS}) + ${EXTRALIBS} + ${ATOMIC_LIBRARIES}) if(HAVE_UDEV) target_link_libraries(librbd LINK_PRIVATE udev) diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index c4cae0430..79a582557 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -103,7 +103,7 @@ if(WITH_LTTNG) add_dependencies(os objectstore-tp) endif() -target_link_libraries(os kv) +target_link_libraries(os kv ${ATOMIC_LIBRARIES}) add_dependencies(os compressor_plugins) add_dependencies(os crypto_plugins) @@ -113,7 +113,7 @@ if(HAVE_LIBAIO) add_executable(ceph-bluestore-tool bluestore/bluestore_tool.cc) target_link_libraries(ceph-bluestore-tool - os global) + os global ${ATOMIC_LIBRARIES}) install(TARGETS ceph-bluestore-tool DESTINATION bin) endif() diff --git a/src/osd/CMakeLists.txt b/src/osd/CMakeLists.txt index 3ec6f31a6..227577b1a 100644 --- a/src/osd/CMakeLists.txt +++ b/src/osd/CMakeLists.txt @@ -43,7 +43,7 @@ add_library(osd STATIC ${osd_srcs} $ $ $) -target_link_libraries(osd ${LEVELDB_LIBRARIES} dmclock ${CMAKE_DL_LIBS} ${ALLOC_LIBS}) +target_link_libraries(osd ${LEVELDB_LIBRARIES} dmclock ${CMAKE_DL_LIBS} ${ALLOC_LIBS} ${ATOMIC_LIBRARIES}) if(WITH_LTTNG) add_dependencies(osd osd-tp pg-tp) endif() diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 57cb2a5b9..a58a1fce9 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -149,7 +149,7 @@ target_link_libraries(rgw_a librados cls_lock_client cls_rgw_client cls_refcount cls_replica_log_client cls_user_client ceph-common common_utf8 global ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} - ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS}) + ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS} ${ATMOIC_LIBRARIES}) if (WITH_CURL_OPENSSL OR (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL)) target_link_libraries(rgw_a ${OPENSSL_LIBRARIES}) @@ -188,7 +188,7 @@ target_link_libraries(radosgw radosgw_a librados cls_version_client cls_replica_log_client cls_user_client global ${FCGI_LIBRARY} ${LIB_RESOLV} ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES} - ${ALLOC_LIBS}) + ${ALLOC_LIBS} ${ATMOIC_LIBRARIES}) # radosgw depends on cls libraries at runtime, but not as link dependencies add_dependencies(radosgw cls_rgw cls_lock cls_refcount cls_log cls_statelog cls_timeindex @@ -208,7 +208,7 @@ target_link_libraries(radosgw-admin rgw_a librados cls_log_client cls_statelog_client cls_timeindex_client cls_version_client cls_replica_log_client cls_user_client global ${FCGI_LIBRARY} ${LIB_RESOLV} - ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES}) + ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES} ${ATMOIC_LIBRARIES}) install(TARGETS radosgw-admin DESTINATION bin) set(radosgw_es_srcs @@ -219,7 +219,7 @@ target_link_libraries(radosgw-es rgw_a librados cls_log_client cls_statelog_client cls_timeindex_client cls_version_client cls_replica_log_client cls_user_client global ${FCGI_LIBRARY} ${LIB_RESOLV} - ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES}) + ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES} ${ATMOIC_LIBRARIES}) install(TARGETS radosgw-es DESTINATION bin) set(radosgw_token_srcs @@ -237,7 +237,7 @@ target_link_libraries(radosgw-object-expirer rgw_a librados cls_log_client cls_statelog_client cls_timeindex_client cls_version_client cls_replica_log_client cls_user_client global ${FCGI_LIBRARY} ${LIB_RESOLV} - ${CURL_LIBRARIES} ${EXPAT_LIBRARIES}) + ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${ATMOIC_LIBRARIES}) install(TARGETS radosgw-object-expirer DESTINATION bin) set(librgw_srcs @@ -259,7 +259,8 @@ target_link_libraries(rgw LINK_PRIVATE global ${LIB_RESOLV} ${CURL_LIBRARIES} - ${EXPAT_LIBRARIES}) + ${EXPAT_LIBRARIES} + ${ATMOIC_LIBRARIES}) set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0 SOVERSION 2) install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/rocksdb/build_tools/build_detect_platform b/src/rocksdb/build_tools/build_detect_platform index 4358d9df9..e18c80b3a 100755 --- a/src/rocksdb/build_tools/build_detect_platform +++ b/src/rocksdb/build_tools/build_detect_platform @@ -451,6 +451,10 @@ elif test -z "$PORTABLE"; then fi fi +if [ "$TARGET_ARCHITECTURE" = "mips" ] ; then + PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic" +fi + PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS $COMMON_FLAGS" diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 66e24b8bc..bbb73f6ee 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -410,7 +410,7 @@ if(PERF_LOCAL_FLAGS) set_target_properties(ceph_perf_local PROPERTIES COMPILE_FLAGS ${PERF_LOCAL_FLAGS}) endif() -target_link_libraries(ceph_perf_local os global ${UNITTEST_LIBS}) +target_link_libraries(ceph_perf_local os global ${UNITTEST_LIBS} ${ATMOIC_LIBRARIES}) # ceph_xattr_bench add_executable(ceph_xattr_bench @@ -483,6 +483,7 @@ target_link_libraries(ceph_test_stress_watch ${EXTRALIBS} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} + ${ATMOIC_LIBRARIES} ) install(TARGETS ceph_test_stress_watch diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt index 041f127ce..83d009948 100644 --- a/src/test/common/CMakeLists.txt +++ b/src/test/common/CMakeLists.txt @@ -43,7 +43,7 @@ add_ceph_unittest(unittest_prioritized_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/u target_link_libraries(unittest_prioritized_queue global ${BLKID_LIBRARIES}) # unittest_mclock_priority_queue -add_executable(unittest_mclock_priority_queue +add_executable(unittest_mclock_priority_queue EXCLUDE_FROM_ALL test_mclock_priority_queue.cc ) add_ceph_unittest(unittest_mclock_priority_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mclock_priority_queue) @@ -101,7 +101,7 @@ add_executable(unittest_throttle $ ) add_ceph_unittest(unittest_throttle ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_throttle) -target_link_libraries(unittest_throttle global) +target_link_libraries(unittest_throttle global ${ATMOIC_LIBRARIES}) # unittest_lru add_executable(unittest_lru diff --git a/src/test/libcephfs/CMakeLists.txt b/src/test/libcephfs/CMakeLists.txt index 5d3f96348..a7b8084a4 100644 --- a/src/test/libcephfs/CMakeLists.txt +++ b/src/test/libcephfs/CMakeLists.txt @@ -17,6 +17,7 @@ if(${WITH_CEPHFS}) ${UNITTEST_LIBS} ${EXTRALIBS} ${CMAKE_DL_LIBS} + ${ATMOIC_LIBRARIES} ) install(TARGETS ceph_test_libcephfs DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/test/librados_test_stub/CMakeLists.txt b/src/test/librados_test_stub/CMakeLists.txt index ba30a4356..0a55fb833 100644 --- a/src/test/librados_test_stub/CMakeLists.txt +++ b/src/test/librados_test_stub/CMakeLists.txt @@ -8,4 +8,4 @@ set(librados_test_stub_srcs TestRadosClient.cc TestWatchNotify.cc) add_library(rados_test_stub STATIC ${librados_test_stub_srcs}) - +target_link_libraries(rados_test_stub ${ATMOIC_LIBRARIES}) diff --git a/src/test/msgr/CMakeLists.txt b/src/test/msgr/CMakeLists.txt index 6222087c4..38f945c4e 100644 --- a/src/test/msgr/CMakeLists.txt +++ b/src/test/msgr/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(ceph_test_async_driver ) set_target_properties(ceph_test_async_driver PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) -target_link_libraries(ceph_test_async_driver os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS}) +target_link_libraries(ceph_test_async_driver os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${ATMOIC_LIBRARIES}) # ceph_test_msgr add_executable(ceph_test_msgr @@ -13,7 +13,7 @@ add_executable(ceph_test_msgr ) set_target_properties(ceph_test_msgr PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) -target_link_libraries(ceph_test_msgr os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS}) +target_link_libraries(ceph_test_msgr os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${ATMOIC_LIBRARIES}) # ceph_test_async_networkstack add_executable(ceph_test_async_networkstack @@ -22,7 +22,7 @@ add_executable(ceph_test_async_networkstack ) set_target_properties(ceph_test_async_networkstack PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) -target_link_libraries(ceph_test_async_networkstack global ${CRYPTO_LIBS} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS}) +target_link_libraries(ceph_test_async_networkstack global ${CRYPTO_LIBS} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${ATMOIC_LIBRARIES}) #ceph_perf_msgr_server add_executable(ceph_perf_msgr_server perf_msgr_server.cc) @@ -34,7 +34,7 @@ target_link_libraries(ceph_perf_msgr_server os global ${UNITTEST_LIBS}) add_executable(ceph_perf_msgr_client perf_msgr_client.cc) set_target_properties(ceph_perf_msgr_client PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) -target_link_libraries(ceph_perf_msgr_client os global ${UNITTEST_LIBS}) +target_link_libraries(ceph_perf_msgr_client os global ${UNITTEST_LIBS} ${ATMOIC_LIBRARIES}) # test_userspace_event if(HAVE_DPDK) diff --git a/src/test/objectstore/CMakeLists.txt b/src/test/objectstore/CMakeLists.txt index 71248d1ac..a8347ef3a 100644 --- a/src/test/objectstore/CMakeLists.txt +++ b/src/test/objectstore/CMakeLists.txt @@ -59,6 +59,7 @@ target_link_libraries(ceph_test_objectstore_workloadgen ${EXTRALIBS} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} + ${ATMOIC_LIBRARIES} ) # ceph_test_filestore_idempotent diff --git a/src/test/osdc/CMakeLists.txt b/src/test/osdc/CMakeLists.txt index 297c2672c..6d7a509c7 100644 --- a/src/test/osdc/CMakeLists.txt +++ b/src/test/osdc/CMakeLists.txt @@ -8,6 +8,7 @@ target_link_libraries(ceph_test_objectcacher_stress global ${EXTRALIBS} ${CMAKE_DL_LIBS} + ${ATMOIC_LIBRARIES} ) install(TARGETS ceph_test_objectcacher_stress DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/test/system/CMakeLists.txt b/src/test/system/CMakeLists.txt index f59ed3e79..a76955ddb 100644 --- a/src/test/system/CMakeLists.txt +++ b/src/test/system/CMakeLists.txt @@ -10,6 +10,7 @@ set(libsystest_srcs st_rados_watch.cc st_rados_notify.cc) add_library(systest STATIC ${libsystest_srcs}) +target_link_libraries(systest ${ATMOIC_LIBRARIES}) # test_rados_list_parallel add_executable(ceph_test_rados_list_parallel diff --git a/src/tools/rbd/CMakeLists.txt b/src/tools/rbd/CMakeLists.txt index 7aa42e9ef..443afbee6 100644 --- a/src/tools/rbd/CMakeLists.txt +++ b/src/tools/rbd/CMakeLists.txt @@ -47,7 +47,7 @@ target_link_libraries(rbd librbd librados rbd_types journal ceph-common global - ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) + ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ATMOIC_LIBRARIES}) if(WITH_KRBD) target_link_libraries(rbd krbd) diff --git a/src/tools/rbd_mirror/CMakeLists.txt b/src/tools/rbd_mirror/CMakeLists.txt index ae1503e7b..ae510fa63 100644 --- a/src/tools/rbd_mirror/CMakeLists.txt +++ b/src/tools/rbd_mirror/CMakeLists.txt @@ -41,6 +41,7 @@ set(rbd_mirror_internal service_daemon/Types.cc) add_library(rbd_mirror_internal STATIC ${rbd_mirror_internal}) +target_link_libraries(rbd_mirror_internal ${ATMOIC_LIBRARIES}) add_executable(rbd-mirror main.cc)