proposal to start merging some source files in libbb/

Rob Landley rob at landley.net
Fri May 19 21:27:15 UTC 2006


On Thursday 18 May 2006 1:47 pm, Paul Fox wrote:
>  > also, i was careful to choose only examples that are part of the
>  > "LIBBB-y" variable from Makefile.in, so the end result should be
>  > *exactly* the same.
>  >
>  > i've tested this and it works just fine.
>
> by this logic we could put all of libb/*.c into a single file
> and we'd still get the minimal subset of routines we need, in
> every case.  this clearly isn't true.

Actually, that's how it started.  That's where xfuncs.c came from.  Eric split 
things up into multiple files for maintainability reasons, but it's possible 
to go too far doing that...

> i think you're confusing compile-time selection (ifdefs, and the
> LIBBB-? variables) with link-time selection -- whether my configured
> set of busybox applets actually needs to pull a given .o out of
> the library or not, even if that .o was indeed built.

They're two methods of accomplishing the same thing.  What Robert's pointing 
out is the issue of maintainability, which is orthogonal.

>  > and so on.  at the moment, each of those functions sucks up its own
>  > source file, for no obvious reason.
>
> but surely you can imagine a busybox binary that needs trim() but
> not last_char_is(), right?  that binary will be smaller today than
> it will be after your merge.

Then use the L_blah mechanism currently in xfuncs.c and llist.c and so on.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list