mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
28 lines
1.3 KiB
CMake
28 lines
1.3 KiB
CMake
# See linux/toolchain-x86_64.cmake for details about multiple load of toolchain file.
|
|
include_guard(GLOBAL)
|
|
|
|
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
|
|
|
set (CMAKE_SYSTEM_NAME "Linux")
|
|
set (CMAKE_SYSTEM_PROCESSOR "e2k")
|
|
set (CMAKE_C_COMPILER_TARGET "e2k-linux-gnu")
|
|
set (CMAKE_CXX_COMPILER_TARGET "e2k-linux-gnu")
|
|
set (CMAKE_ASM_COMPILER_TARGET "e2k-linux-gnu")
|
|
|
|
# Adding `-mcmodel=large` is to handle the link error:
|
|
# relocation R_E2K_32_ABS out of range: 2273892512 is not in [-2147483648, 2147483647]
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcmodel=large")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large")
|
|
|
|
#set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-e2k")
|
|
|
|
#set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}")
|
|
|
|
# Make sure to ignore global clang configuration files which could influence the
|
|
# build environment using --no-default-config
|
|
#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH} --no-default-config")
|
|
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH} --no-default-config")
|
|
#set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH} --no-default-config")
|
|
#set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --no-default-config")
|
|
#set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --no-default-config")
|