|
There are a few guidelines that must be followed when building applications with this environment.
Header search paths
First, it is important for the program to include the correct headers. To ensure that glibc 2.1 headers are not included do not put
/usr/include
in the include path on the command line. The compiler will search
/usr/include
for include files only after searching the glibc 2.0 headers in
/usr/i386-glibc20-linux/include. Binaries compiled against glibc 2.1 headers and glibc 2.0 libraries have little chance of working.
Program search paths
It is a good idea to set the /usr/i386-glibc20-linux/bin as the first part of you PATH while compiling glibc 2.0 programs. This ensures that the glibc 2.0 versions of the linker, assembler and other critical binaries are used instead of the glibc 2.1 binaries. use
env PATH="/usr/i386-glibc20-linux/bin;$PATH"
to set your path before running
make
or one of the compatibility compilers. Here's an example:
[msw@rhl60 msw]$ env PATH="/usr/i386-glibc20-linux/bin;$PATH" \
i386-glibc20-linux-gcc -o hello hello.c
|
|