dpkg

First of all dpkg needs to be told about uclibc-<arch> architectures. Those instructions are for post-etch. Look below for instructions for etch. Add to /usr/share/dpkg/triplettable (literally, you may copy and paste):

uclibc-linux-<cpu> uclibc-<cpu>

And to /usr/share/dpkg/ostable add this:

uclibc-linux linux-uclibc linux[^-]*-uclibc

For etch just add this to ostable instead:

uclibc linux-uclibc linux[^-]*(-uclibc.*)?

Now dpkg-architecture -auclibc-<arch> should give you reasonable output:

linux-libc-dev:

The directory name changed! this section needs updating To be able to build the linux-libc-dev packages a few changes have to be made. It is not possible yet to build kernel packages so you'll have to disable that. Also the rules file uses DEB_HOST_ARCH when DEB_HOST_ARCH_CPU seems to be perfectly fine for most arches. Unfortunately DEB_HOST_ARCH and DEB_HOST_ARCH_CPU aren't the same for armel. But as far as I can tell this might still work. Finally the control file gets generated by a python script which doesn't add uclibc-<arch> to the Architecture fields.

Get the source apt-get source linux-libc-dev and change into the source directory. Now you have to disable building kernel images. To do so edit debian/config/<arch>/defines and in the [base] section comment all flavours and subarches. For i386 the resulting first lines should be something like this:

Now change debian/rules. All entries that are foo-$(DEB_HOST_ARCH) need to be changed to foo-$(DEB_HOST_ARCH_CPU). source-$(DEB_HOST_ARCH_CPU), setup-$(DEB_HOST_ARCH_CPU), build-$(DEB_HOST_ARCH_CPU), binary-arch-$(DEB_HOST_ARCH_CPU) and setup-$(DEB_HOST_ARCH_CPU)-real.

leave this alone:

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)

Now run debian/rules clean You should be told that the control file was created:

This target is made to fail intentionally, to make sure
that it is NEVER run during the automated build. Please
ignore the following error, the debian/control file has
been generated SUCCESSFULLY.

So it's time to change the control file. Open debian/control in an editor and search for your <arch>. So for i386 search for i386. If it is in an Architecture line add uclibc-<arch> (uclibc-i386). Repeat until your uclibc-<arch> is added to all Architecture lines. Here's an example:

gcc first pass

The patch in the emdebian mailinglist shopuld work. Just apply it and prepend DEB_CROSS_BOOTSTRAP=yes to the normal cross build. Dependencies are not fixed yet. just ignore them It'll take some time until I can make the patches work again. In the meantime you might want to try building gcc manually. The trick is use make all-gcc and make install-gcc instead of doing a full build. The Cross Linux From Scratch doumentation is a good reference.

build without common libs and common pkgs if DEB_CROSS_BOOTSTRAP=yes (rules.default)

change rules.defs to not build objc++, c++ and without ssp if DEB_CROSS_BOOTSTRAP=yes (rules.default)

make all-gcc and install-gcc if DEB_CROSS_BOOTSTRAP=yes (rules2)

disable threads and shared libraries (rules2)

probably some more, also the dependencies are most likely broken. but I want to look at the results of this before doing anything additionally

Unfortunately for now you are on your own for the time being. But building the bootstrap compiler the way it is describe in the CLFS book should do the trick

uclibc first pass

now do a normal build and install libuclibc-dev and its dependencies with dpkg-cross

libexpat

gettext may want it

gettext

If you want native language support you will need libintl, which uclibc doesn't support. So instead build it from gettext.

gcc second pass

try WITHOUT_LANG=nls until there are gettext packages

final uclibc

repeat the first pass.

ToDo

double check every step and fill in the missing parts. At the moment I'm using this page to not forget stuff.