[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: USE_FEATURES: static library vs. "inplace" hack
On Sat, 23 Feb 2008 13:37:58 +0200
Aleksey Cheusov <cheusov%tut.by@localhost> wrote:
> >> Several months ago USE_FEATURES framework were introduced.
> >> I think idea is cool. API is easy. But I still don't understand why
> >> libnbcompat library should be built again and again
> >> instead of building a static library once.
> >> That is why "inplace" method was implemented instead of
> >> linking with statically linked library built and installed once.
> > I am working on a somewhat different scheme. Building the whole static
> > compat library and linking every binary in the package with it is too
> > crude.
> I still don't understand why. Can you explain? AFAIK linker will not
> include unused object files into resulting executable.
> Do you mean libraries?
Because it may replace libc functions were it doesn't actually need to.
An example is USE_FEATURES+= snprintf
snprintf must be replaced on IRIX and AIX, but only if the program
uses the return value from the function. Otherwise the builtin snprintf
is fine. So we need a mechanism to create an archive containing only
the stuff that was actually requested.
So if we do need to replace getopt_long, but don't need to replace
snprintf, then the current model will replace both (and some additional
Main Index |
Thread Index |