summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorManuel Bentele2020-11-20 08:16:25 +0100
committerManuel Bentele2020-11-20 08:16:25 +0100
commitf00717d56cb3078d90fb096f7771d17b4fa19fb5 (patch)
tree0f96ebf6cef2a16edb9cdf34aba650f1965d74df /src/server
parent[KERNEL] Fix several connect/disconnect race conditions (diff)
downloaddnbd3-f00717d56cb3078d90fb096f7771d17b4fa19fb5.tar.gz
dnbd3-f00717d56cb3078d90fb096f7771d17b4fa19fb5.tar.xz
dnbd3-f00717d56cb3078d90fb096f7771d17b4fa19fb5.zip
[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).
Diffstat (limited to 'src/server')
-rw-r--r--src/server/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
index 463f944..038d626 100644
--- a/src/server/CMakeLists.txt
+++ b/src/server/CMakeLists.txt
@@ -55,7 +55,7 @@ add_executable(dnbd3-server ${CMAKE_CURRENT_SOURCE_DIR}/altservers.c
${CMAKE_CURRENT_SOURCE_DIR}/uplink.c
${CMAKE_CURRENT_SOURCE_DIR}/urldecode.c)
target_include_directories(dnbd3-server PRIVATE ${JANSSON_INCLUDE_DIR})
-target_link_libraries(dnbd3-server dnbd3-version dnbd3-build dnbd3-shared ${CMAKE_THREAD_LIBS_INIT} ${JANSSON_LIBRARIES})
+target_link_libraries(dnbd3-server dnbd3-version dnbd3-build dnbd3-shared atomic ${CMAKE_THREAD_LIBS_INIT} ${JANSSON_LIBRARIES})
if(DNBD3_SERVER_FUSE)
find_package(Fuse REQUIRED)