On Thu, Mar 25, 2010 at 3:50 PM, Steve Deiters <[email protected]>wrote:

> Is there a method to have gcc or ld automatically generate a list of
> dependencies for statically linked libraries?


Neither could be used generate such dependencies because such deps cannot be
calculated until after the code is linked (i.e., all external symbols have
been resolved). Any change of the client code could change which libs it
needs. We cannot know which external symbols it needs until it is compiled,
and do not know where they come from until it is linked. Chicken vs. egg.

My fallback plan is to parse through the LDFLAGS for the library names
> and paths and add the dependencies programmatically by calling eval, but
> I would like to avoid this if possible.
>

If you do get this working generically, i would like to see the code if you
don't mind posting it :).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to