Is a pain in the ass. For sure :)
#Somehow mawk gives us trouble?
sudo apt-get install gawk
sudo ln -s /usr/bin/gawk /usr/bin/mawk
#Checkout the latest glibc source via GIT (currently 2.14)
git clone git://sourceware.org/git/glibc.git
cd glibc
git checkout --track -b glibc-2_14-branch origin/release/2.14/master
#apply patch (manually): http://sourceware.org/ml/libc-alpha/2008-05/txt00002.txt
#apply patch (manually): http://www.linuxfromscratch.org/patches/lfs/6.8/glibc-2.13-gcc_fix-1.patch
#To avoid the use of SYS ENTER system calls:
#apply patch (manually): http://stackoverflow.com/questions/2131094/how-to-force-gcc-use-int-for-system-calls-not-sysenter
#Somehow Ubuntu doesn't like SSP?
export CFLAGS="-O2 -g -fno-stack-protector -U_FORTIFY_SOURCE"
cd ..
mkdir build
mkdir install
mkdir install/etc/
touch ./install/etc/ld.so.conf
cd build
../glibc/configure --prefix=/home/vvdveen/mylibc/install
make
make install
After this, I use static linking to use the new library:
gcc file.c -L/home/vvdveen/mylibc/install/lib -lc -static