From f00717d56cb3078d90fb096f7771d17b4fa19fb5 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 20 Nov 2020 08:16:25 +0100 Subject: [BUILD] add support for atomic operations not supported by hardware This change links the dnbd3-server with 'libatomic' to add support for atomic operations not supported by hardware (especially 32-bit hardware architectures, such as ARM). Thus the dnbd3-server can also run on a Raspberry Pi 1 running Rasperry Pi OS. Note that the dnbd3-server is still linked to the libatomic, even if the hardware supports atomic operations. In this case, the compiler resolves atomic operations and replaces them automatically with specific built-in functions. This unnecessary linkage can be removed in the future if the GCC supports an upcoming option called automatic linking of libatomic (--enable-autolink-libatomic). --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bad9c00..65b9ebb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release) set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md) # set DEB generator specific packaging options - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libfuse2, libjansson4") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libfuse2, libjansson4, libatomic1") if(DNBD3_KERNEL_MODULE) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postinst "depmod -a\n") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postrm "depmod -a\n") @@ -141,7 +141,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release) endif(DNBD3_KERNEL_MODULE) # set RPM generator specific packaging options - set(CPACK_RPM_PACKAGE_REQUIRES "glibc, fuse-libs, jansson") + set(CPACK_RPM_PACKAGE_REQUIRES "glibc, fuse-libs, jansson, libatomic") set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib" "/lib/modules" "/lib/modules/${CMAKE_SYSTEM_VERSION}" -- cgit v1.2.3-55-g7522