You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I today discovered the directory cmake/Toolchains, a nice place to put my cmake toolchain file for crosscompiling the arm targets.
I am not a cmake guru, perhaps you guys can have a look on how to better optimize the file so that it works for as much platforms as possible:
One easy thing to do is to remove the absolute paths to gcc and g++,
I am not sure how to handle
SET(CMAKE_FIND_ROOT_PATH /usr/local/linaro/arm-linux-gnueabihf/)
or
SET(SYSTEM_USR_DIR /usr/local/linaro/arm-linux-gnueabihf/)
in an (if possible) system independant way.
Michael
# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
SET(CMAKE_C_COMPILER /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /usr/local/linaro/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /usr/local/linaro/arm-linux-gnueabihf/)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(SYSTEM_USR_DIR /usr/local/linaro/arm-linux-gnueabihf/)
The text was updated successfully, but these errors were encountered:
michael-ring
changed the title
Support for cross compiling with linareo toolchainApr 9, 2015
Looks ok tbh, the cool thing about the oe/yocto toolchain is that it comes with it's own 'env' file so that compiler paths etc don't have to be hard set. Does the linaro toolchain not come with something like this?
I today discovered the directory cmake/Toolchains, a nice place to put my cmake toolchain file for crosscompiling the arm targets.
I am not a cmake guru, perhaps you guys can have a look on how to better optimize the file so that it works for as much platforms as possible:
One easy thing to do is to remove the absolute paths to gcc and g++,
I am not sure how to handle
SET(CMAKE_FIND_ROOT_PATH /usr/local/linaro/arm-linux-gnueabihf/)
or
SET(SYSTEM_USR_DIR /usr/local/linaro/arm-linux-gnueabihf/)
in an (if possible) system independant way.
Michael
The text was updated successfully, but these errors were encountered: