set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(TOOLCHAIN_PREFIX x86_64-elf)

set(CMAKE_AR                    ${TOOLCHAIN_PREFIX}-ar)
set(CMAKE_ASM_COMPILER          ${TOOLCHAIN_PREFIX}-as)
set(CMAKE_C_COMPILER            ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER          ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_LINKER                ${TOOLCHAIN_PREFIX}-ld)
set(CMAKE_OBJCOPY               ${TOOLCHAIN_PREFIX}-objcopy)
set(CMAKE_RANLIB                ${TOOLCHAIN_PREFIX}-ranlib)
set(CMAKE_SIZE                  ${TOOLCHAIN_PREFIX}-size)
set(CMAKE_STRIP                 ${TOOLCHAIN_PREFIX}-strip)

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_CROSS_COMPILING TRUE)
