set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR ARC-HS)

set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)

set(CMAKE_C_COMPILER arc-elf32-gcc)
set(CMAKE_CXX_COMPILER arc-elf32-g++)

set(ARC_HS_FLAGS "-Os -mcpu=archs -mcode-density-frame")
set(CMAKE_C_FLAGS "${ARC_HS_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${ARC_HS_FLAGS}" CACHE STRING "" FORCE)
