xtools: support xtensa hal

Xtensa toolchain has a HAL library that needs to be compiled in similar
to how we do this with the Zephyr SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-01-04 09:38:43 -05:00
parent 7ed0c7415c
commit 857644997e
1 changed files with 11 additions and 0 deletions

View File

@ -17,3 +17,14 @@ set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
if("${ARCH}" STREQUAL "xtensa")
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
set(TOOLCHAIN_INCLUDES
${SYSROOT_DIR}/include/arch/include
${SYSROOT_DIR}/include
)
LIST(APPEND TOOLCHAIN_LIBS hal)
LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
endif()