On Mon, Mar 25, 2013 at 11:43:36AM +0100, dexen deVries wrote:
> 
> if mk understood 8c's construct ``#pragma lib "libbio.a"'' and used it to 
> link 
> correct libraries, it could be said to understand the actual dependencies as 
> expressed by code.
> 

Except that there is a topological sorting to be done, since the
linking with libraries is order dependent. And one will need to
explicitely state that some lib depends on some others for the
linking (except if the symbols in the library are scanned to detect
unsatisfied dependencies and a search is done in standard directories
to find a library satisfying the dependency etc.). From a superficial
analysis, there is no easy way to do what the Go tools are doing
(by setting rules and giving informations in the packages to build
the dependencies), except for simple cases. (I wanted to compile kerTeX
on all OSes statically; when coming to a 2D interface to METAFONT, I
need to link against what window libraries are there; and once you
tackle the task to try to deduce from a dynamically shared X11 library
what are the exact dependencies to explicitely state all the static
versions to link against, you start seeing the mess...)

-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Reply via email to