[BusyBox] Compiling busybox with newlib [PATCH]

Shaun Jackman sjackman at gmail.com
Fri Mar 4 16:51:55 UTC 2005


On Thu, 3 Mar 2005 22:43:49 -0500, Mike Frysinger <vapier at gentoo.org> wrote:
> ive merged the following:
> include/busybox.h
> libbb/interface.c
> libbb/syscalls.c (umount2 fix only)
> shell/lash.c
> 
> for syscalls.c, cant we just add a define check for _NEWLIB_VERSION ?  that
> code block only exists to support older glibc's and isnt used on newer
> ones ...

I'd be fine with that if it's your preferred solution. In general I
like to avoid ifdefs on specific targets, otherwise the source
eventually ends up looking like #if !SPARC && !CRAY &&
(POSSIBLY_A_GAMEBOY || OR_MAYBE_A_CRUSOE). It can only get worse.

There's very little of busybox that actually requires Linux. With few
changes it will run well on BSD or a non-Linux embedded target. The
most significant step is simply avoiding using include linux/* and
asm/*, which by simple definition cannot be used on anything but
Linux. I have to objections to Linux specific utilities that can be
omitted from the .config file. However source files in libbb that are
always compiled should play nice with other systems.

On Fri, 4 Mar 2005 08:30:57 +0100, Bastian Blank <waldi at debian.org> wrote:
> On Thu, Mar 03, 2005 at 08:38:35PM -0800, Shaun Jackman wrote:
> > No Linux kernel. =P
> Then disable such linux specific parts completely.

We could add a CONFIG_FEATURE_LINUX, which is set by default. It's
primary purpose would be to #ifdef around #include <linux/*> and
#include <asm/*> statements that cause the build to stop dead in its
tracks for non-Linux systems.

Cheers,
Shaun



More information about the busybox mailing list