Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Fri, 1 Nov 2013 20:08:05 +0100 Alexander Neundorf wrote: > and the name of the library target ? Still crt0 or something else ? BTW I'm using 2.8.11.2 in Debian sid -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Fri, 1 Nov 2013 20:08:05 +0100 Alexander Neundorf wrote: > On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > > On Fri, 1 Nov 2013 17:36:33 +0100 > > > > Alexander Neundorf wrote: > > > > If it was supposed to work right out of the box without fiddling > > > > with > > > > > > having to set the LANGUAGE is expected for unusual file > > > extensions. With that, it should work. > > > > That's OK. I just had to understand how. > > > > > Could you try to rename your target "crt0" to something different > > > and see whether this changes something ? > > > > I renamed the crt0.x file to pino.x. > > removed add_dependencies() and set_property(...) > > pino.x get assembled but it doesn't get linked. > and the name of the library target ? Still crt0 or something else ? Changed too. Everything is generated by a python script that take the name of the target from the source (+ numbering if needed to avoid duplicates in targets name). I just had one file whose name was duplicated and coincidentally it was an asm file too. 2 exception.x whose targets became exception and exception1 but both of them were compiled and just 1 linked, since just one was actually referenced in the rest of the code. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > On Fri, 1 Nov 2013 17:36:33 +0100 > > Alexander Neundorf wrote: > > > If it was supposed to work right out of the box without fiddling > > > with > > > > having to set the LANGUAGE is expected for unusual file extensions. > > With that, it should work. > > That's OK. I just had to understand how. > > > Could you try to rename your target "crt0" to something different and > > see whether this changes something ? > > I renamed the crt0.x file to pino.x. > removed add_dependencies() and set_property(...) > pino.x get assembled but it doesn't get linked. and the name of the library target ? Still crt0 or something else ? Alex -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Fri, 1 Nov 2013 17:36:33 +0100 Alexander Neundorf wrote: > > If it was supposed to work right out of the box without fiddling > > with > having to set the LANGUAGE is expected for unusual file extensions. > With that, it should work. That's OK. I just had to understand how. > Could you try to rename your target "crt0" to something different and > see whether this changes something ? I renamed the crt0.x file to pino.x. removed add_dependencies() and set_property(...) pino.x get assembled but it doesn't get linked. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > On Fri, 1 Nov 2013 12:58:32 +0100 > > Alexander Neundorf wrote: > > On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > > > On Fri, 1 Nov 2013 11:37:10 +0100 > > > > > > Alexander Neundorf wrote: > > > > so crt0.x is the missing one, right ? > > > > Are you sure it is not compiled ? > > > > > > Absolutely. Once I've added > > > add_dependencies(someotherasm crt0.x) > > > crt0.x got compiled BUT not linked. > > > > Very strange. > > I'll see whether I can reproduce this. > > If it was supposed to work right out of the box without fiddling with having to set the LANGUAGE is expected for unusual file extensions. With that, it should work. > it I'll try to add some more details and a bunch code sample. > All the code involved is part of atmel asf[1] > The 2 files involved are trampoline.x and crt0.x. > > crt0.x define _stext > > .global _stext > .type _stext, @function > _stext: > > > and trampoline.x uses it > > lda.w pc, _stext > > I've a > add_library(crt0 crt0.x) > and a > target_link_libraries(... crt0) > > But without some help[2] crt0 doesn't get compiled and linked Could you try to rename your target "crt0" to something different and see whether this changes something ? > [1] I'm working on an older version then the one available on atmel > site but I think you can get the idea > > [2] > add_dependencies(trampoline crt0.x) hmm, this should actually only add dependencies between targets, and crt0.x is just a source file, not a target. So this is strange too. > make it compile > set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0) > make it link usually a target_link_libraries(SAM3 ... crt0 ... ) should do. Alex -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Fri, 1 Nov 2013 12:58:32 +0100 Alexander Neundorf wrote: > On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > > On Fri, 1 Nov 2013 11:37:10 +0100 > > > > Alexander Neundorf wrote: > > > so crt0.x is the missing one, right ? > > > Are you sure it is not compiled ? > > > > Absolutely. Once I've added > > add_dependencies(someotherasm crt0.x) > > crt0.x got compiled BUT not linked. > > Very strange. > I'll see whether I can reproduce this. If it was supposed to work right out of the box without fiddling with it I'll try to add some more details and a bunch code sample. All the code involved is part of atmel asf[1] The 2 files involved are trampoline.x and crt0.x. crt0.x define _stext .global _stext .type _stext, @function _stext: and trampoline.x uses it lda.w pc, _stext I've a add_library(crt0 crt0.x) and a target_link_libraries(... crt0) But without some help[2] crt0 doesn't get compiled and linked [1] I'm working on an older version then the one available on atmel site but I think you can get the idea [2] add_dependencies(trampoline crt0.x) make it compile set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0) make it link -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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
Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote: > On Fri, 1 Nov 2013 11:37:10 +0100 > > Alexander Neundorf wrote: > > so crt0.x is the missing one, right ? > > Are you sure it is not compiled ? > > Absolutely. Once I've added > add_dependencies(someotherasm crt0.x) > crt0.x got compiled BUT not linked. Very strange. I'll see whether I can reproduce this. Alex -- 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
[CMake] does cmake get dependencies between asm files? and when said so does it link them?
On Fri, 1 Nov 2013 11:37:10 +0100 Alexander Neundorf wrote: > so crt0.x is the missing one, right ? > Are you sure it is not compiled ? Absolutely. Once I've added add_dependencies(someotherasm crt0.x) crt0.x got compiled BUT not linked. But even after I succede to compile libcrt0.a and even if crt0 was included in the target_link_libraries() list it was missing from the list of the actually linked libraries. That mean I had a libcrt0.a but cmake was running gcc without it in the list of libraries to link. I finally found a way to force cmake to link it adding set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0) after target_link_libraries(). I don't know if this is the best way to do it but it works. Anyway I ran into a new list of problems I'm still investigating. So as for the "how to make cmake recognize different asm extension" and the "how to force cmake to compile and link asm files when it seems it can't get dependencies right" the problem seems solved -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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