[CMake] TI-C CMAKE_C_LINK_EXECUTABLE order
Tristram, Falk
falk.tristram at cognex.com
Thu May 28 02:15:09 EDT 2015
Hi all,
before creating a bug report about this problem, I first want to get feedback here.
I have created a CMake build system for a whole bunch of embedded targets all working fine.
Now I ran into a strange problem related to the tms470_5.0.1.
Some of the symbols are just dropped by linker (optimized out).
I pinned down the problem to the "TI-C.cmake".
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
<OBJECTS> is the last entry.
In my case OBJECTS just consists out of one file "main.c.obj".
Changing the order just works fine, as follows:
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> <LINK_FLAGS>")
Now here is my question:
Is there any specific reason why <OBJECTS> comes as last parameter?
Could you change the order for future versions?
Note: I am still checking/testing the impact of the changed order to our other TI-C build systems.
Best regards,
Falk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150528/57c5c6e4/attachment.html>
More information about the CMake
mailing list