From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-12-04 17:33:51
[2002-12-04] Vladimir Prus wrote:
>David Abrahams wrote:
>> Vladimir Prus <ghost_at_[hidden]> writes:
>>>I'm in process of implementing new system libraries interface and
>>>have a couple of question on runtime-link feature.
>>>1. What should it do? Will it affect the way toolset runtime is linked,
>>> or default linking for all system libraries.
>> The intention was just to affect the runtime. Of course, there's a
>> question of whether I chose the right feature to implement in the
>> first place.
>I can see several possible scenarious:
>1. Everything's shared. That can be used both for development
> and for version for customer, provided you know how to set
> correct paths for dynamic loader
>2. Every internal library is static. System libraries and C runtime
> is dynamic. Usefull when you make assumption about system libraries
> but don't want to deal with runtime link paths.
>3. Everything's static. Usefull when you want to create a binary that
> will work on a different system (i.e. with older C runtime).
>I'm not sure it's usefull to link statically to all system libraries
>except for C runtime -- I'd like to see the case, if it exists.
>Seems that if a specific system library is causing problems,
>you can link statically only *that library*, explicitly.
The biggest case for linking statically to *all* libraries, system and
internal, is when you are doing utilities that need to work at OS boot time.
Things like, cp, sh, etc. at least for *nix OSs.
>Maybe, we need a feature that would affect all system libraries, including
>Unfortunately, such feature would erase similarlity between system and
>internal libraries. If "a" is internal and "b" is system, and I
>want static linking for both, I'd have to write.
> exe main : a/<shared>false <b>/<system-shared>false ;
>and that's ugly. Any bright ideas what to do with it?
Not if you define/declare the distinction that "a" is internal and "b" is
system beforehand. If we already know that "b" is system then we can do
exe main : a b : <shared-link>false ;
Or more specifically have a single feature, perhaps "<link>", that
enumerates the above three options, instead of just false/true...
<link>shared -- The default (#1 above).
<link>static -- Internal libraries linked static (#2 above).
<link>maximum-static -- As many libraries as possible are linked static
(#3 above)... In some platform, like MacOSX, some libraries must be dynamic
Having it this way eliminates the need to worry about what the "runtime"
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk