2017-12-13 01:59:37 +08:00
|
|
|
set(TOOLCHAIN_HOME /opt/xtensa/XtDevTools/install/tools/$ENV{TOOLCHAIN_VER}/XtensaTools)
|
|
|
|
|
|
|
|
set(COMPILER gcc)
|
|
|
|
|
|
|
|
set(CROSS_COMPILE_TARGET xt)
|
|
|
|
set(SYSROOT_TARGET xtensa-elf)
|
|
|
|
|
|
|
|
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
|
|
|
|
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
|
|
|
|
|
|
|
|
# xt-xcc does not support -Og, so make it -O0
|
|
|
|
set(OPTIMIZE_FOR_DEBUG_FLAG "-O0")
|
|
|
|
|
|
|
|
set(CC xcc)
|
|
|
|
set(C++ xc++)
|
|
|
|
|
2018-11-02 00:46:00 +08:00
|
|
|
set(NOSYSDEF_CFLAG "")
|
|
|
|
|
2017-12-13 01:59:37 +08:00
|
|
|
list(APPEND TOOLCHAIN_C_FLAGS -fms-extensions)
|
2018-11-02 00:46:00 +08:00
|
|
|
|
|
|
|
# xcc doesn't have this, so we need to define it here.
|
|
|
|
# This is the same as in the xcc toolchain spec files.
|
|
|
|
list(APPEND TOOLCHAIN_C_FLAGS
|
|
|
|
-D__SIZEOF_LONG__=4
|
|
|
|
)
|
2019-01-09 21:47:25 +08:00
|
|
|
|
|
|
|
set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
|