Hello,
I'm confused by an issue that I am having with a project I have recently
joined.
We are cross compiling for ARM on linux.
I have the cross compiler toolchain installed at /CC_TOOLCHAIN
I set CMAKE_SYSROOT_PATH appropriately, then do this in my toolchain file:
set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT_PATH}/usr/lib")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
upon launching cmake with this command:
cmake --debug-trycompile --debug-output
-DCMAKE_TOOLCHAIN_FILE=CC_TOOLCHAIN/toolchain.cmake ../src
I encounter this error
/CC_TOOLCHAIN/arm-gcc
-D_POSIX_C_SOURCE=199506 -D_POSIX_VERSION=199506 -DGPT_VERSION="" -o
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
/home/Me/build/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec
cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt
--verbose=1
/CC_TOOLCHAIN/arm-gcc
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o cmTryCompileExec
-rdynamic
/CC_TOOLCHAIN/ld:
cannot find crt1.o: No such file or directory
Curious as to the contents of the cmake_link_script at
CMakeFiles/cmTryCompileExec.dir/link.txt
$cat link.txt
/CC_TOOLCHAIN/arm-gcc CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o
cmTryCompileExec -rdynamic
So, I guess my question is, where is the "-L" to specify link directories,
or how do I know / specify where the linker thinks it is allowed to look
for libraries ?
Thanks.
Jack
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake