Commit 830ec028 authored by Kumar Gala's avatar Kumar Gala Committed by Anas Nashif
Browse files

cmake: toolchain: zephyr-0.10.0: Fix setting of SYSROOT_DIR on xtensa



We need to set SYSROOT_DIR as the last thing we do on target.cmake so
we reset how its set for xtensa.  Otherwise when we build with newlib
we will not get the proper path to newlib headers in the toolchain.

This matches the behavior of 0.9.5/target.cmake

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 2270f4b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
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})
@@ -28,3 +27,4 @@ if("${ARCH}" STREQUAL "xtensa")
  LIST(APPEND TOOLCHAIN_LIBS hal)
  LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
endif()
set(SYSROOT_DIR   ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})