Google Summer of Code/2014/Ideas/Embedded Gentoo using musl

This project involves integrating an alternative standard C library called musl into Gentoo, both for cross compiling and native compiling. Musl aims to be "lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety." [1] So far, stage4 tarballs have been built for amd64 [2], i686 [3] and armv7a-hardfloat-eabi [4]. These were initially built using cross compiling toolchians which themselves were built using crossdev [5], but then were rebuilt on native hardware using home grown scripts [6], and not catalyst [7].

Picking up from here, the next steps in the project are:

1) To build cross compiling toolschains for mips32r2-o32, mipsel3-o32 and mips64r2-n32 architectures/abis. This will involve properly intergrating musl with crossdev which currently has some bugs [8].

2) To build stage 4 tarballs for the those architectures. This involves, among other things, patching various packages that don't conform to strict POSIX which musl assumes [9].

3) These stages need to be converted to stage3's, properly built using catalyst rather than using the ROOT=rootfs emerge -e @system technique which the homegrown scripts use.

4) If all goes well, the project can continue to porting over the hardened tool chain to those architectures [10].

Such a project would involve very eclectic skills: from hacking python in catalyst and bash in crossdev, to patching build systems and C code, to working with libc at a low (implementation) level.

Refs.

[1] http://www.musl-libc.org/

[2] http://distfiles.gentoo.org/experimental/amd64/musl/

[3] http://distfiles.gentoo.org/experimental/x86/musl/

[4] http://distfiles.gentoo.org/experimental/arm/musl/

[5] http://www.gentoo.org/proj/en/base/embedded/handbook/cross-compiler.xml?style=printable

[6] http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=tree;f=tools-musl

[7] https://www.gentoo.org/proj/en/releng/catalyst/

[8] https://bugs.gentoo.org/show_bug.cgi?id=498114

[9] http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=shortlog;h=refs/heads/musl

[10] https://wiki.gentoo.org/wiki/Project:Hardened