%general-entities; ]> glibc-32 &glibc-version;
&glibc-url;
Glibc-&glibc-version; - 32-bit Glibc-32 Preparation to install of ML-Glibc patch -Np1 -i ../&glibc-fhs-patch; Remove a file that may be left over from a previous build attempt: mv /usr/include/limits.h{,.backup} Installation of Glibc - 32-bit The Glibc documentation recommends building Glibc in a dedicated build directory: mkdir -v build cd build Prepare Glibc for compilation: CC="gcc -m32 -ffile-prefix-map=/tools=/usr" \ CXX="g++ -m32 -ffile-prefix-map=/tools=/usr" \ ../configure --prefix=/usr \ --disable-werror \ --enable-kernel=&min-kernel; \ --enable-stack-protector=strong \ --enable-multi-arch \ --libdir=/usr/lib32 \ --libexecdir=/usr/lib32 \ --with-headers=/usr/include \ libc_cv_slibdir=/usr/lib32 \ i686-pc-linux-gnu Compile the package: make Install the package: sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile make install_root=$PWD/DESTDIR install mv -v DESTDIR/usr/lib32/* /usr/lib32/ install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \ /usr/include/gnu/ ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-linux.so.2 ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-lsb.so.3 ln -svf ../lib/locale /usr/lib32/locale Configure the linker cache configuration: echo "/usr/lib32" > /etc/ld.so.conf.d/lib32.conf ldconfig Do cleanup: cd .. rm -rf build Glibc - x32-bit The Glibc documentation recommends building Glibc in a dedicated build directory: mkdir -v build cd build Prepare Glibc for compilation: CC="gcc -mx32 -ffile-prefix-map=/tools=/usr" \ CXX="g++ -mx32 -ffile-prefix-map=/tools=/usr" \ ../configure --prefix=/usr \ --disable-werror \ --enable-kernel=&min-kernel; \ --enable-stack-protector=strong \ --enable-multi-arch \ --libdir=/usr/libx32 \ --with-headers=/usr/include \ libc_cv_slibdir=/usr/libx32 \ x86_64-pc-linux-gnux32 Compile the package: make Install the package: sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile make install_root=$PWD/DESTDIR install mv -v DESTDIR/usr/libx32/* /usr/libx32/ install -vm644 DESTDIR/usr/include/gnu/lib-names-x32.h /usr/include/gnu/ [ -e DESTDIR/usr/include/gnu/stubs-x32.h ] \ && install -vm644 DESTDIR/usr/include/gnu/stubs-x32.h /usr/include/gnu/ \ || ln -v /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-x32.h ln -svf ../usr/libx32/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2 ln -svf ../lib/locale /usr/libx32/locale Configure the linker cache configuration: echo "/usr/libx32" > /etc/ld.so.conf.d/libx32.conf ldconfig Do cleanup: cd .. rm -rf build Cleanup Restore the file we moved temporarily away: mv /usr/include/limits.h{.backup,}