Skip to main content.

12. Runtime Library

12.1. glibc

and [[http://sources.redhat.com/glibc/

Modern releases of glibc are very large for a traditional embedded system. If your application requires only one or two user programs, you can statically link them to avoid requiring the entire dynamic library. Another option is to hand-strip the dynamic library to a bare minimum.

Some modifications are required to the official glibc-2.1.x releases to make them work in the embedded PowerPC environment, such as cache line size modifications. See http://lists.linuxppc.org/listarcs/linuxppc-embedded/199909/msg00000.html

After applying these modifications, glibc-2.1.x can be configured for cross-compiling with:

#!/bin/sh
export PATH=/path/to/local/i686-pc-linux-gnu/bin:$PATH
export CFLAGS="-msoft-float -O2 -DNDEBUG=1"
export CC=powerpc-linux-gcc
export AR=powerpc-linux-ar
export RANLIB=powerpc-linux-ranlib
configure --host=powerpc-linux --prefix=/path/to/local/powerpc-linux \
  --with-headers=/path/to/linux-2.2.13/include --enable-add-ons=linuxthreads \
  --with-gnu-as --with-gnu-ld --disable-sanity-checks --without-fp

There is a magic script named which removes unused functions from the shared C library in the Debian Boot Floppies package, at ftp://ftp.us.debian.org/debian/dists/potato/main/source/admin/boot-floppies_2.2.23.tar.gz

12.2. sglibc

http://sourceforge.net/projects/sglibc and http://external-lists.varesearch.com/lists/listinfo/sglibc

This is an attempt to produce a small glibc-compatible C runtime library subset suitable for embedded systems.

To cut down some of the bloat in glibc, apply the patches at http://external-lists.varesearch.com/archives/sglibc/1999-September/000007.html

12.3. uClibc

http://opensource.lineo.com/cgi-bin/cvsweb/uClibc/

uC-Libc is a C library for embedded systems developed originally for uClinux and now being ported to other architectures including PowerPC. It has a different set of design goals from GNU libc, but for many embedded systems it is a sensible choice.

12.4. dietlibc

http://www.fefe.de/dietlibc/

The diet libc is a libc that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, mips, sparc, ppc and x86.

12.5. newlib

http://sources.redhat.com/newlib/

Newlib is a free C library intended for use on embedded systems, with less restrictive licensing than the GPL. However, it currently lacks the libgloss layer necessary to use it as the C library under Linux.

12.6. libc5

Older Linux libc's are often quite small, but generally not supported by anyone now.

11. Device Drivers 1. Introduction 13. Root Filesystem
Prev Home Next