From 9a8aea1b682f522d7b278312b9bd85ed12fab820 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 11 Aug 2020 10:13:37 -0700 Subject: CMake: Link with -latomic Some architecutres (such as RISC-V) require that atomics be specifically linked to avoid build failures. Ensure that this is the case. Signed-off-by: Alistair Francis Change-Id: Iad543232a6547b197f04100e996e6200c9f803ce --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3e3a9e15..ab776626 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -172,6 +172,7 @@ TARGET_LINK_LIBRARIES(afbwsc ${libsystemd_LDFLAGS} ${json-c_LDFLAGS} -lpthread + -latomic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-afbwsc.map -Wl,--as-needed -Wl,--gc-sections -- cgit 1.2.3-korg