Thursday, February 5, 2009

Build and using a new glibc

  1. export LD_LIBRARY_PATH=
  2. ../glibc-2.5/configure --prefix=/home/xxxx/nptl/install
  3. make
  4. make install
  5. link to new glibc
gcc test.c -L/home/xxxx/nptl/install/lib -I/home/xxxx/nptl/install/include -static -lpthread

  • modify glibc
some definition, include pthread_mutex_t etc.
glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h

some nptl function
glibc-2.5/nptl/pthread_mutex_lock.c
glibc-2.5/nptl/sysdeps/i386/pthread_spin_lock.c

cp glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h install/include/bits/pthreadtypes.h
cp build/nptl/libp* install/lib
rm build/libc.so

No comments:

Post a Comment