From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-13 11:52:35
Andre Hentz wrote:
> > 1. Why do you need static linking to a specific library?
> I need a few wrapper programs to link statically against libstdc++ (or
> libsup++). It is part of the specification that they may run on a system
> where libstdc++.so is not present.
What about using fully static linking with
bjam link=statuc link-runtime=static
> > 2. One approach is to use:
> > g++ ..... -Wl,-Bstatic -lwhatever
> > however this will fail if there's no static version of whatever. Also,
> > there's assymentry with:
> > g++ ..... -Wl,-Bshared -lwhatever
> > which will link to whatever.so if present, but will also link with
> > whatever.a, not fail. Is the '-Bstatic' behaviour what you're after? I'm
> > a bit worried by its platform-specificity.
> Yes, that's what I have in mind. If I use <find-static-library>, I
> expect it to fail if there's no libwhatever.a. In fact, -Bstatic is
> linker-specific, not platform-specific.
Anyway, I don't really like feature which works only sometimes and on some
linkers. Maybe, <linkflags> is better.
> That is also the case for
> "-Wl,-R", "-Wl,-h", "-Wl,-rpath-link" and "-Wl,--strip-all". I'm
> updating my BB setup and haven't got to solaris yet but I believe
> --strip-all is going to cause problems.
I don't think we use it in V2.
> -rpath-link is also potentialy
> problematic but I'm not using it so it's not a biggie.
I think we have this issue solved on solaris, anyway.
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