Skip to content

Commit

Permalink
Add -latomic for arm and riscv64
Browse files Browse the repository at this point in the history
  • Loading branch information
wtdcode committed Dec 28, 2023
1 parent 53da7c5 commit 55560a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ else()
string(FIND "${UC_COMPILER_MACRO}" "__arm__" UC_RET)
if(${UC_RET} GREATER_EQUAL "0")
set(UNICORN_TARGET_ARCH "arm")
set(UNICORN_CFLAGS "${UNICORN_CFLAGS} -latomic")
break()
endif()
string(FIND "${UC_COMPILER_MACRO}" "__aarch64__" UC_RET)
Expand Down Expand Up @@ -221,6 +222,7 @@ else()
string(FIND "${UC_COMPILER_MACRO}" "__riscv" UC_RET)
if(${UC_RET} GREATER_EQUAL "0")
set(UNICORN_TARGET_ARCH "riscv")
set(UNICORN_CFLAGS "${UNICORN_CFLAGS} -latomic")
break()
endif()
string(FIND "${UC_COMPILER_MACRO}" "__s390__" UC_RET)
Expand Down

0 comments on commit 55560a2

Please sign in to comment.