diff --git a/CMakeLists.txt b/CMakeLists.txt index 38f963a60e8..dafb407ae26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,12 +70,14 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FLB_FILENAME__=__FILE__") if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -latomic") set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic") endif() if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(FLB_SYSTEM_FREEBSD On) add_definitions(-DFLB_SYSTEM_FREEBSD) set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -lutil") set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -lutil") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lutil") endif() # *BSD is not supported platform for wasm-micro-runtime except for FreeBSD.