Conditionally compiled lib*/*.o [was: Re: [PATCH] ...]

Bernhard Fischer rep.nop at aon.at
Sat May 13 13:32:58 UTC 2006


On Sat, May 13, 2006 at 09:04:44AM -0400, Robert P. J. Day wrote:
>On Sat, 13 May 2006, Bernhard Fischer wrote:
>
>> On Fri, May 12, 2006 at 05:52:41PM -0400, Robert P. J. Day wrote:
>> >
>> >  i'm *reasonably* certain that this patch should be applied.
>>
>> If you want to cleanup this area, then please make generally sure to
>> check against make-3.79.1 (as long as this is regarded a requirement),
>> make-3.80 and make-3.81.
>> The three cases which have to be tested with each of these versions is
>> a) building in-tree
>> b) building in empty obj-dir (-f Makefile)
>> b) building to empty obj-dir (O=)
>
>actually, that brings up a point someone mentioned earlier.  that
>funky little patch i posted earlier for automating the multi-part
>source files involved invoking a "call" inside an "eval", which i
>recall someone suggested didn't work (or didn't work properly) in
>earlier versions of make.
>
>does anyone here know if that's an issue?  *should* that work?
>because if it's not supported or broken in earlier versions, then it's
>obviously not a good patch.

If it doesn't work for all versions of make(1) the maintainer want's us
to support, then yes, it's broken and should not have been applied.

Someone may disagree, but it gets increasingly painful to support
anything older than make-3.80. We have very special requirements due to
the way we build certain parts of the project. These requirements are
seldomly seen/imposed unto make in other projects.

Some cleanups and simplifications we could do in our buildsystem require
somewhat current versions of make.
I, personally, would require the current, stable release of make (3.81
as the time of this writing), but i'm aware that the installed base of
3.80 is very big (the majority of distros use/ship it).


A sidenote on your patch. While i agree that it's a nice automatism, i
really fail to see what it gains us.
The con:
- It's slower since you spawn an extra shell
On the pro side, you don't have to hard-code the list of obj into the
makefile. This is IMHO very little gain.


One thing that would be good to have is to think about a way to extract
the objects (functions) which are exported by libbb/ */lib* (e.g.
libunarchival et al.) and are actually *used* by the set of selected
applets.

This would allow to remove the hardcoded list of
"# conditionally compiled objects:"
from libbb/Makefile.in

As you may recall, there was talk about me adding more of such
hard-coded dependency for mtab_file (see ML archives).
I think that it is nice if only the parts of lib* are built which are
actually used by the .config, since it cuts down on the compile time.
Furthermore it makes us less dependant on the toolchain dropping unused
functions, so it's even more robust (no arguments about broken
toolchain, please).

>
>thoughts?

plenty :)



More information about the busybox mailing list