diff --git a/cmake/nuttx_sethost.cmake b/cmake/nuttx_sethost.cmake index 18b3a49701632..a7505605cc498 100644 --- a/cmake/nuttx_sethost.cmake +++ b/cmake/nuttx_sethost.cmake @@ -79,12 +79,15 @@ function(nuttx_sethost) if("${NUTTX_BOARD}" STREQUAL "sim") if(ARCHITECTURE STREQUAL "x86_64") message(" Select HOST_X86_64=y") - if(CMAKE_HOST_SYSTEM_NAME MATCHES "MSYS|CYGWIN|Windows") + list(APPEND NUTTX_SYSTEM_SETHOST "HOST_X86_64=y") + if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|Darwin|FreeBSD") + # Enable the System V ABI + list(APPEND NUTTX_SYSTEM_SETHOST "SIM_X8664_SYSTEMV=y") + elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "MSYS|CYGWIN|Windows") # Enable Microsoft ABI and the System V ABI list(APPEND NUTTX_SYSTEM_SETHOST "SIM_X8664_SYSTEMV=y") list(APPEND NUTTX_SYSTEM_SETHOST "SIM_X8664_MICROSOFT=y") endif() - list(APPEND NUTTX_SYSTEM_SETHOST "HOST_X86_64=y") elseif(ARCHITECTURE STREQUAL "x86") message(" Select HOST_X86=y") list(APPEND NUTTX_SYSTEM_SETHOST "HOST_X86=y")