Hi,<br><br>I have set up a toolchain file [1] to enable cross-compiling a project. In my current setup, both the host and target environments are binary-compatible (both are x86 and are using gcc&#39;s with compatible ABIs). When I generate a cross-compiled executable and run ldd, the paths to libraries such as libc, libc++, and m show up rooted at /lib. I was expecting something more in the line of ${CMAKE_FIND_ROOT_PATH}/lib.<br>
Conversely, the external dependencies I explicitly added using find_libraries appear rooted at ${CMAKE_FIND_ROOT_PATH}, which is what I expected.<br><br>Is this behavior correct, or did I misunderstood something along the way?<br>
<br>In case it helps, my toolchain file looks something like this:<br><br># Target system label<br>set(CMAKE_SYSTEM_NAME Linux)<br>set(CMAKE_SYSTEM_PROCESSOR i586)<br><br><br># Specify the cross compiler<br>set(CMAKE_C_COMPILER   /path/to/i586-unknown-linux-gnu-gcc)<br>
set(CMAKE_CXX_COMPILER  /path/to/ii586-unknown-linux-gnu-g++)<br><br># Target environment location<br>set(CMAKE_FIND_ROOT_PATH  /my/root/path)<br>                          <br><br># Search for programs in the build host directories<br>
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br><br># Search for libraries and headers in the target directories<br>set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br><br><br>Cheers,<br clear="all">
<br>-- <br>Adolfo Rodríguez Tsouroukdissian<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>Tel. +34.93.414.53.47<br>Fax.+34.93.209.11.09<br>