This section covers installing glibc 2 as a test library. Anything you
compile will be linked to your existing libraries unless you give some
extra parameters to link to the new libraries. It appears that the
paths are compiled into quite a few files, so you probably have to
install the library from source.

This will put linuxthreads, crypt, and localedata directories in the
glibc-2.0.6 directory where configure can find these add-ons.

Configuring.

In the glibc-2.0.6 directory, create a directory named compile, and
cd into it. All work will be done in this directory, which will simplify
cleaning up. (The developers have not been very concerned with getting 'make clean' perfect yet.)

mkdir compile
cd compile

Run ../configure. To use the add-on packages, you need to specify
them with --enable-add-ons, such as --enable-add-ons=linuxthreads,crypt,localedata.
You also need to choose a destination directory to install to.
/usr/i486-linuxglibc2 is a good choice. The configure line for this would be:

This is the only library where the location is fixed once a program
is linked, and using a link in /lib will ease upgrading to glibc as
your primary C library when the stable version is released.

Edit /etc/ld.so.conf. You need to add path to the lib
directory the new libraries reside in at the end of the file, which will
be <prefix>/lib, such as /usr/i486-linuxglibc2/lib
for the choice above. After you have modified /etc/ld.so.conf, run

The last step of installation is updating /usr/lib/gcc-lib so gcc
knows how to use the new libraries. First you need to duplicate the existing
configuration. To find out which configuration is current, use the -v
option of gcc:

In this case, i486-unknown-linux is the system, and 2.7.2.2 is the
version. You need to copy the /usr/lib/gcc-lib/<system> to
the new test system directory:

cd /usr/lib/gcc-lib/
cp -r i486-unknown-linux i486-linuxglibc2

Change into your new test system directory and version directory

cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2

and edit the file specs found in this directory. In this file,
change /lib/ld-linux.so.1 to /lib/ld-linux.so.2. You also
need to remove all expressions %{...:-lgmon} in the file, since
glibc does not use the gmon library for profiling. A sample specs file can
be found in the
Sample specs file section.

You might also have other libraries such as ncurses which need their
header files put in this directory. You should copy or link the files
from /usr/include. (Some libraries may need to be recompiled
with glibc2 in order to work with it. In these cases, just compile and
install the package to /usr/i486-linuxglibc2.)