diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-08-11 10:13:37 -0700 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-09-30 11:50:40 +0000 |
commit | 9a8aea1b682f522d7b278312b9bd85ed12fab820 (patch) | |
tree | ad7fee873dbe335a9365d3bcd8b659309f3690ed | |
parent | 1b6249810b3ab2d0c7467355fa22fbf19ae4a725 (diff) |
CMake: Link with -latomicmarlin_12.90.0marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.012.90.011.92.011.91.010.93.010.92.010.91.0
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.txt | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 1 |
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 |