From: Rutger H. <ru...@cs...> - 2004-02-18 16:46:17
|
Hi list, I am linking a libbla.so from a bla.c and zero or more external libraries /libApath/libA.a, /libBpath/libB.a, ..., etc. In my project there are several directories where this situation occurs; the number, name and location of the extra libraries depends on platform, configuration etc. I want to use one globally shared build-native.xml which is <imported> into the light-weight local build.xml. To parameterize the current compile, I feed as properties/references the path of the current directory, a defineset for specific includes, and I want to feed the specific external libraries each directory and correspondig libbla.so needs. Now I meet problems: (1) I cannot use <libset>: the number of extra libraries and their paths varies. If libset carried an if/unless attribute, that might help (but not for an unspecified number of extra libraries). Some variety of libset to solve my problem seems definitely preferable, though, because it is strong on portability issues. (2) I can create a reference property that describes the paths to all currently needed extra libraries, and feed this as a <fileset> nested element to <cc>. This is suggested in the cpptasks documentation as an alternative to <libset>. This approach sounds fine BUT (for the gcc driver at least) it triggers a bug in the linker command. The command that is generated/executed by <cc> reads something like: gcc -shared -o libbla.so /libApath/libA.a /libBpath/libB.a ... bla.o and this yields unsatisfied references for all of the symbols exported by libA, libB... The solution is simple: the link line should append the libraries <fileset> *past* the locally compiled bla.o, like this: gcc -shared -o libbla.so bla.o /libApath/libA.a /libBpath/libB.a and the linking is OK. Question: o Should I fix this in the cpptasks source? + Cpptasks maintainer, would you then apply my patches to CVS? What would be the time path to survey my patches? + Or would you prefer me to join the developers? (Note, I would only fix what I need. My boss has no urge for me to do community developing.) o Or should I wait for somebody else to fix this? + Is there any cue as to the time path for such minor bugs? Kind regards, Rutger Hofman VU Amsterdam http://www.cs.vu.nl/~rutger |