This is the mail archive of the
mailing list for the eCos project.
Re: Adding library to libtarget.a
Heiko Panther wrote:
Right. My question should have been, "How do I use a library in a
package?". I've seen how you add source files to a package - with the
compile statement. I found no similar statement to add a library. I
only have the library, not the source files.
edit the ecos.ecc file. Look at option CYGBLD_GLOBAL_LDFLAGS. You
should be able to add the extra link parameters there.
I actually tried that. Problem here is the link order. It seems that the
items from CYGBLD_GLOBAL_LDFLAGS get linked last, but would have been
needed for libtarget.a, which gets linked earlier. That's why I tried to
get my lib into the package.
But that's what you want surely - if libtarget.a comes earlier, you need
your library to come later on the link line in order to satisfy the
dependencies. You may also need to add an additional -ltarget to satisfy
the dependencies of your library too.
Worst case, hack $ECOS_REPOSITORY/pkgconf/rules.mak
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
Visit us at Embedded World 2004, Nürnberg, Germany, 17-19 Feb, Stand 12-449
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss