[BusyBox] Compiling busybox with newlib [PATCH]

Rob Landley rob at landley.net
Sun Mar 6 18:14:52 UTC 2005


On Friday 04 March 2005 12:45 pm, Shaun Jackman wrote:
> On Fri, 4 Mar 2005 11:27:32 -0500, Rob Landley <rob at landley.net> wrote:
> > Modules support is linux specific.
> > We play with a lot of /proc stuff in places, I don't know how much of
> > that BSD supports.
> > I thought the loop.c stuff was Linux specific.
> > init had a number of platform specific special case horrors in it...
> >
> > This is still a minority of the system, but if you start using it more
> > heavily I expect you'll run into more stuff...
> >
> > Rob
>
> loop.c does look pretty Linux specific. In that case, I think the best
> approach is to simply wrap the whole file in a #ifdef
> CONFIG_FEATURE_LINUX, or HAVE_LINUX_KERNEL_H for a more autoconf-ish
> look.

If you're saying that Linux should not be the default, but should instead be a 
config option, I'm pretty sure that ain't happening.

I'd much rather see the make system fixed so it doesn't compile that file when 
you haven't selected the stuff that needs it.  I believe all that needs it 
are losetup, and mount and umount with loop support.  (CONFIG_LOSETUP | 
CONFIG_FEATURE_MOUNT_LOOP)

> My primary concern is simply that busybox compiles on a non-Linux
> system. Since every libbb source file is built regardless of the
> config, any Linux specific include halts the build.

This is because Linux has always been the ONLY platform supported by busybox.  
(I vaguely remember Erik made statements to this effect earlier...)

> If those Linux 
> specific utilities fail in some consistent way at run time, so be it.
> Puttering through proc, for example, doesn't usually include any
> unusual header files and only calls the triumvirate of open, read,
> close, so those utilities will simply fail at run time, which is the
> correct behaviour i.m.h.o.

(IMHO never makes anyone seem more humble, and isn't it strange the way people 
seem to use it to add weight to their pronouncements?  Sorry, pet peeve.)

Sprinkling #ifdefs around to support a non-linux system, when busybox has 
always only run on LInux, is a tough sell.  Macros that hide the #ifdefs in a 
header file are, at the very least, less ugly.
 
> Cheers,
> Shaun

Rob



More information about the busybox mailing list