[BusyBox] Compiling busybox with newlib [PATCH]

Shaun Jackman sjackman at gmail.com
Sat Mar 5 22:16:06 UTC 2005


On Sat, 5 Mar 2005 13:55:59 -0500, Rob Landley <rob at landley.net> wrote:
> Your bootloader is unrelated to busybox, and although I thought about gluing a
> tiny lilo onto busybox once, once I really looked into it it turns out there
> are 8 gazillion hardware platforms and they all use different bootloaders, so
> it's not worth it.

I agree it's most certainly not busybox's job to provide myriad board
support packages.
 
> In terms of libraries, off the top of my head there's glibc, uclibc, dietlib,
> klibc, and now you're talking about newlib.  Plus whatever macos X is using
> if you start to go that route.
> 
> If there's a more generic way of phrasing something in busybox so it can play
> nice with more libraries, fine.  If we need #ifdefs for each one of those, it
> will get ugly rapidly.

I agree here as well. busybox, however, commonly uses idioms like the
following..
	#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
	#include <net/ethernet.h>
... instead of this accepted and more flexible approach.
	#if HAVE_NET_ETHERNET_H
	#include <net/ethernet.h>

With my patch I responded in busybox's existing style...
	#if __GNU_LIBRARY__ < 5 && !defined __dietlibc__ && !defined _NEWLIB_VERSION
	#include <net/ethernet.h>
... but I would fully support a cleaner approach.

> I know that with uclibc, if there's something that works with glibc but
> doesn't work with uclibc, and especially if there's no easy way of phrasing
> it once without ifdefs that would make both uclibc and glibc happy, then we
> _fix_uclibc_.  (The fact the uclibc maintainer and the busybox maintainer are
> the same guy helps here...)

newlib is also a very adaptive project. I've made a number of changes
on its side to support compiling busybox with newlib. If newlib needs
fixing, I'm happy to do it. In fact, it's not the libc dependency
issues that have caused me the most trouble, but the kernel dependency
issues.

Cheers,
Shaun



More information about the busybox mailing list