cmake: xtensa: use absolute paths for tools

CMake has convention of changing relative paths to absolute
for CMAKE_* variables. It does it automatically f.e. CMAKE_C_COMPILER.
However for our tools like objcopy we have to do it manually.
It also helps with integration of CMake in some IDEs.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-06-05 10:27:14 +02:00
parent f0eedcbab7
commit 5dd9aaccb4
2 changed files with 8 additions and 8 deletions

View File

@ -36,10 +36,10 @@ else()
set(CMAKE_C_COMPILER ${CROSS_COMPILE}gcc)
endif()
set(CMAKE_LD ${CROSS_COMPILE}ld CACHE STRING "")
set(CMAKE_AR ${CROSS_COMPILE}ar CACHE STRING "")
set(CMAKE_OBJCOPY ${CROSS_COMPILE}objcopy)
set(CMAKE_OBJDUMP ${CROSS_COMPILE}objdump)
find_program(CMAKE_LD NAMES "${CROSS_COMPILE}ld" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_AR NAMES "${CROSS_COMPILE}ar" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_OBJCOPY NAMES "${CROSS_COMPILE}objcopy" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_OBJDUMP NAMES "${CROSS_COMPILE}objdump" PATHS ENV PATH NO_DEFAULT_PATH)
set(CMAKE_FIND_ROOT_PATH ".")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@ -15,10 +15,10 @@ set(CROSS_COMPILE "xt-")
set(CMAKE_C_COMPILER ${CROSS_COMPILE}xcc)
set(CMAKE_LD ${CROSS_COMPILE}ld CACHE STRING "")
set(CMAKE_AR ${CROSS_COMPILE}ar CACHE STRING "")
set(CMAKE_OBJCOPY ${CROSS_COMPILE}objcopy)
set(CMAKE_OBJDUMP ${CROSS_COMPILE}objdump)
find_program(CMAKE_LD NAMES "${CROSS_COMPILE}ld" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_AR NAMES "${CROSS_COMPILE}ar" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_OBJCOPY NAMES "${CROSS_COMPILE}objcopy" PATHS ENV PATH NO_DEFAULT_PATH)
find_program(CMAKE_OBJDUMP NAMES "${CROSS_COMPILE}objdump" PATHS ENV PATH NO_DEFAULT_PATH)
set(CMAKE_FIND_ROOT_PATH ".")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)