Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-05 06:57:11

Rene Rivera wrote:

> 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.

Ah.. completely forgot about this one.

>>Maybe, we need a feature that would affect all system libraries, including
>>C runtime.
>>Unfortunately, such feature would erase similarlity between system and
>>internal libraries. If "a" is internal and "b" is system, and I
> specifically
>>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
> this:
> 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
> linked.
> Having it this way eliminates the need to worry about what the "runtime"
> libraries are.

That's an excellent idea! And even if somebody desires to find-tunue
C runtime only, we've a way for extension: just add new values to the
<link> feature. Maybe "maximum-static" can be "all-static"?

I'm eager to implement it as soon as possible. Anybody has objections?

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at