For glibc 2.15, I had to do as ks1322:
$ ../glibc2.15/configure CFLAGS="-O2 -U_FORTIFY_SOURCE -fno-stack-protector" $ make
-O2 needs to restore the default optimization needed to prevent a series of crashes.
-U_FORTIFY_SOURCE is required to avoid gcc ../sysdeps/unix/sysv/linux/syslog.c ( In function '__vsyslog_chk': [...] inlining failed in call to 'syslog' )
-fno-stack-protector required to avoid the failure of gcc [...] elf/dl-allobjs.os libc_pic.a ( (init-first.os):(.data+0x0): multiple definition of '__libc_multiple_libcs' ) .
With these CFLAGS I get only a warning ( errlist.c count 133 inflated to GLIBC_2.12 count 134 (old errno.h?) ).
PS It is also very important not to use the gold linker ( ld.gold , from the binutils-gold ), because libc config reject it. This is easy to do by changing the /usr/bin/ld symbolic link from ld.gold to ld.bfd .
source share