To download and build the glibc was quite simple thanks to the guide provided by Chris here. The main steps (provided by the article) are:
1) mkdir $HOME/src
2) cd $HOME/src
3) git clone git://sourceware.org/git/glibc.git
4) mkdir -p $HOME/build/glibc
5) cd $HOME/build/glibc
6) $HOME/src/glibc/configure --prefix=/usr
7) make
This builds a fully functional glibc in the build directory which can be rebuilt anytime using the src directory. The c files present in the src directory must be altered to change the object files in the build directory. I made a small print program here that simply outputs a test message. When compiled with the installed system glibc it prints "hello world!" once. When compiled with my build of glibc it prints it twice due to the changes I made to the print.c file in the src directory. It is important to note that everytime the src directory is altrered in any way the build directory must be remade, and commenting out the proper code to test your code is VERY IMPORTANT. I had to rm -rf my directories a few times because I deleted important code to introduce a bug.
Override mechanisms: judging by the example here it appears to mean overwrtiting the previous application defintions with those that the system supports.
Multiarch mechanisms: "the capability of a system to install and run applications of multiple different binary targets on the same system."(Debian) In other words running a non-native application on a platform. Multiarch refers to the support the application has in this scenario.
Source by Debian here
1) mkdir $HOME/src
2) cd $HOME/src
3) git clone git://sourceware.org/git/glibc.git
4) mkdir -p $HOME/build/glibc
5) cd $HOME/build/glibc
6) $HOME/src/glibc/configure --prefix=/usr
7) make
This builds a fully functional glibc in the build directory which can be rebuilt anytime using the src directory. The c files present in the src directory must be altered to change the object files in the build directory. I made a small print program here that simply outputs a test message. When compiled with the installed system glibc it prints "hello world!" once. When compiled with my build of glibc it prints it twice due to the changes I made to the print.c file in the src directory. It is important to note that everytime the src directory is altrered in any way the build directory must be remade, and commenting out the proper code to test your code is VERY IMPORTANT. I had to rm -rf my directories a few times because I deleted important code to introduce a bug.
Override mechanisms: judging by the example here it appears to mean overwrtiting the previous application defintions with those that the system supports.
Multiarch mechanisms: "the capability of a system to install and run applications of multiple different binary targets on the same system."(Debian) In other words running a non-native application on a platform. Multiarch refers to the support the application has in this scenario.
Source by Debian here
Comments
Post a Comment