Hi Falk,

the TI Docs contains the following line:
cl6x --run_linker {--rom_model | --ram_model} filenames
[options] [--output_file= name.out] --library= library [lnk.cmd]

therefore i'd suggest the following changes:
set(CMAKE_C_LINK_EXECUTABLE   "<CMAKE_C_COMPILER>   --run_linker <OBJECTS>
<CMAKE_C_LINK_FLAGS>   <LINK_FLAGS> --map_file=<TARGET>.map
--output_file=<TARGET> <LINK_LIBRARIES>")
set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_ASM_COMPILER> --run_linker <OBJECTS>
<CMAKE_ASM_LINK_FLAGS> <LINK_FLAGS> --map_file=<TARGET>.map
--output_file=<TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> --run_linker <OBJECTS>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> --map_file=<TARGET>.map
--output_file=<TARGET> <LINK_LIBRARIES>")

I'm using it on a c++ project, linker language is c, the c/c++ line above
works for me. I didn't test ASM, but i guess that's straight forward.

Maybe Alex Neundorf  can do this change .

Regards,
 Florian

2015-05-28 8:15 GMT+02:00 Tristram, Falk <falk.trist...@cognex.com>:

> 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
>
> --
>
> 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://public.kitware.com/mailman/listinfo/cmake
>
-- 

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://public.kitware.com/mailman/listinfo/cmake

Reply via email to