[CMake] does cmake get dependencies between asm files? and when said so does it link them?
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Nov 1 12:36:33 EDT 2013
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> On Fri, 1 Nov 2013 12:58:32 +0100
>
> Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
> > On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> > > On Fri, 1 Nov 2013 11:37:10 +0100
> > >
> > > Alexander Neundorf <a.neundorf-work at gmx.net> 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
More information about the CMake
mailing list