summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2020-08-11 10:13:37 -0700
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-09-30 11:50:40 +0000
commit9a8aea1b682f522d7b278312b9bd85ed12fab820 (patch)
treead7fee873dbe335a9365d3bcd8b659309f3690ed
parent1b6249810b3ab2d0c7467355fa22fbf19ae4a725 (diff)
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 <alistair.francis@wdc.com> Change-Id: Iad543232a6547b197f04100e996e6200c9f803ce
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt1
2 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62c56a9c..0a2713ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,6 +155,7 @@ SET(link_libraries
${LIBMAGIC_LDFLAGS}
-ldl
-lrt
+ -latomic
)
ADD_SUBDIRECTORY(src/devtools)
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