mirror of
https://git.yoctoproject.org/poky
synced 2026-03-31 02:02:25 +02:00
The previous string manipulations would result in the wrong string being used for machines such as intel-corei7-64 as the sysroot was split at the first hyphen (so would result in corei7 instead of corei7-64). Change the logic so that it looks for processor-distro-os and uses the whole of the processor field. (From OE-Core rev: ce24958d644f2218d5415be574a5b7e1ee8c9b2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
23 lines
958 B
CMake
23 lines
958 B
CMake
set( CMAKE_SYSTEM_NAME Linux )
|
|
set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
|
|
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
|
|
set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
|
|
set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
|
|
|
|
set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
|
|
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
|
|
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
|
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
|
set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
|
|
|
# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os).
|
|
if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+")
|
|
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1})
|
|
endif()
|
|
|
|
# Include the toolchain configuration subscripts
|
|
file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
|
|
foreach(config ${toolchain_config_files})
|
|
include(${config})
|
|
endforeach()
|