[8eb3fe4] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[ee1a413] | 8 | <sect1 arch="ml_32,ml_x32,ml_all" id="ch-system-glibc-32" role="wrap">
|
---|
[8eb3fe4] | 9 | <?dbhtml filename="glibc-32.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info condition="script">
|
---|
| 12 | <productname>glibc-32</productname>
|
---|
| 13 | <productnumber>&glibc-version;</productnumber>
|
---|
| 14 | <address>&glibc-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
| 17 | <title>Glibc-&glibc-version; - 32-bit</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-glibc-32">
|
---|
| 20 | <primary sortas="a-Glibc-32">Glibc-32</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
[d8fba27] | 23 | <sect2 role="installation">
|
---|
| 24 | <title>Preparation to install of ML-Glibc</title>
|
---|
| 25 |
|
---|
| 26 | <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
|
---|
[8eb3fe4] | 27 |
|
---|
[d8fba27] | 28 | <para>Remove a file that may be left over from a previous build attempt:</para>
|
---|
[8eb3fe4] | 29 |
|
---|
[d8fba27] | 30 | <screen><userinput remap="pre">mv /usr/include/limits.h{,.backup} </userinput></screen>
|
---|
[8eb3fe4] | 31 |
|
---|
| 32 | </sect2>
|
---|
[ee1a413] | 33 |
|
---|
| 34 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
| 35 |
|
---|
| 36 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[8eb3fe4] | 37 | <title>Installation of Glibc - 32-bit</title>
|
---|
| 38 |
|
---|
| 39 | <para>The Glibc documentation recommends building Glibc
|
---|
| 40 | in a dedicated build directory:</para>
|
---|
| 41 |
|
---|
| 42 | <screen><userinput remap="pre">mkdir -v build
|
---|
| 43 | cd build</userinput></screen>
|
---|
| 44 |
|
---|
| 45 | <para>Prepare Glibc for compilation:</para>
|
---|
| 46 |
|
---|
[d8fba27] | 47 | <screen><userinput remap="configure">CC="gcc -m32 -ffile-prefix-map=/tools=/usr" \
|
---|
| 48 | CXX="g++ -m32 -ffile-prefix-map=/tools=/usr" \
|
---|
[8eb3fe4] | 49 | ../configure --prefix=/usr \
|
---|
| 50 | --disable-werror \
|
---|
| 51 | --enable-kernel=&min-kernel; \
|
---|
| 52 | --enable-stack-protector=strong \
|
---|
| 53 | --enable-multi-arch \
|
---|
| 54 | --libdir=/usr/lib32 \
|
---|
| 55 | --libexecdir=/usr/lib32 \
|
---|
| 56 | --with-headers=/usr/include \
|
---|
| 57 | libc_cv_slibdir=/usr/lib32 \
|
---|
| 58 | i686-pc-linux-gnu</userinput></screen>
|
---|
| 59 |
|
---|
| 60 | <para>Compile the package:</para>
|
---|
| 61 |
|
---|
| 62 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 63 |
|
---|
| 64 | <para>Install the package:</para>
|
---|
| 65 |
|
---|
| 66 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
|
---|
| 67 | make install_root=$PWD/DESTDIR install
|
---|
| 68 | mv -v DESTDIR/usr/lib32/* /usr/lib32/
|
---|
| 69 | install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \
|
---|
| 70 | /usr/include/gnu/
|
---|
| 71 | ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-linux.so.2
|
---|
| 72 | ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-lsb.so.3
|
---|
| 73 | ln -svf ../lib/locale /usr/lib32/locale</userinput></screen>
|
---|
| 74 |
|
---|
| 75 | <para>Configure the linker cache configuration:</para>
|
---|
| 76 |
|
---|
| 77 | <screen><userinput>echo "/usr/lib32" > /etc/ld.so.conf.d/lib32.conf
|
---|
| 78 | ldconfig</userinput></screen>
|
---|
| 79 |
|
---|
| 80 | <para>Do cleanup:</para>
|
---|
| 81 |
|
---|
| 82 | <screen><userinput>cd ..
|
---|
| 83 | rm -rf build</userinput></screen>
|
---|
| 84 |
|
---|
| 85 | </sect2>
|
---|
| 86 |
|
---|
[ee1a413] | 87 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
[d8fba27] | 88 |
|
---|
| 89 | <!--
|
---|
| 90 | In case the compilation ends with
|
---|
| 91 |
|
---|
| 92 | ...
|
---|
| 93 | if test -r /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h && cmp -s /autolfs/sources/glibc-2.29/build/stubs.h /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h; \
|
---|
| 94 | then echo 'stubs.h unchanged'; \
|
---|
| 95 | else /usr/bin/install -c -m 644 /autolfs/sources/glibc-2.29/build/stubs.h /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h; fi
|
---|
| 96 | rm -f /autolfs/sources/glibc-2.29/build/stubs.h
|
---|
| 97 | /autolfs/sources/glibc-2.29/build/elf/sln /autolfs/sources/glibc-2.29/build/elf/symlink.list
|
---|
| 98 | /autolfs/sources/glibc-2.29/build/elf/sln: /autolfs/sources/glibc-2.29/build/elf/sln: cannot execute binary file
|
---|
| 99 | make[1]: *** [Makefile:106: install-symbolic-link] Error 126
|
---|
| 100 | make[1]: Leaving directory '/autolfs/sources/glibc-2.29'
|
---|
| 101 | make: *** [Makefile:12: install] Error 2
|
---|
| 102 |
|
---|
| 103 | it is a good sign that the actually running kernel isn't ML-enabled.
|
---|
| 104 | ArchLinux's kernels are configured like
|
---|
| 105 |
|
---|
| 106 | CONFIG_IA32_EMULATION=y
|
---|
| 107 | # CONFIG_IA32_AOUT is not set
|
---|
| 108 | # CONFIG_X86_X32 is not set
|
---|
| 109 |
|
---|
| 110 | It isn't x32-enabled ==> Error when building x32 stuff
|
---|
| 111 | -->
|
---|
[ee1a413] | 112 |
|
---|
| 113 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[8eb3fe4] | 114 | <title>Glibc - x32-bit</title>
|
---|
| 115 |
|
---|
| 116 | <para>The Glibc documentation recommends building Glibc
|
---|
| 117 | in a dedicated build directory:</para>
|
---|
| 118 |
|
---|
| 119 | <screen><userinput remap="pre">mkdir -v build
|
---|
| 120 | cd build</userinput></screen>
|
---|
| 121 |
|
---|
| 122 | <para>Prepare Glibc for compilation:</para>
|
---|
| 123 |
|
---|
[d8fba27] | 124 | <screen><userinput remap="configure">CC="gcc -mx32 -ffile-prefix-map=/tools=/usr" \
|
---|
| 125 | CXX="g++ -mx32 -ffile-prefix-map=/tools=/usr" \
|
---|
[8eb3fe4] | 126 | ../configure --prefix=/usr \
|
---|
| 127 | --disable-werror \
|
---|
| 128 | --enable-kernel=&min-kernel; \
|
---|
| 129 | --enable-stack-protector=strong \
|
---|
| 130 | --enable-multi-arch \
|
---|
| 131 | --libdir=/usr/libx32 \
|
---|
| 132 | --with-headers=/usr/include \
|
---|
| 133 | libc_cv_slibdir=/usr/libx32 \
|
---|
| 134 | x86_64-pc-linux-gnux32</userinput></screen>
|
---|
| 135 |
|
---|
| 136 | <para>Compile the package:</para>
|
---|
| 137 |
|
---|
| 138 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 139 |
|
---|
| 140 | <para>Install the package:</para>
|
---|
| 141 |
|
---|
| 142 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
|
---|
| 143 | make install_root=$PWD/DESTDIR install
|
---|
| 144 | mv -v DESTDIR/usr/libx32/* /usr/libx32/
|
---|
| 145 | install -vm644 DESTDIR/usr/include/gnu/lib-names-x32.h /usr/include/gnu/
|
---|
| 146 | [ -e DESTDIR/usr/include/gnu/stubs-x32.h ] \
|
---|
| 147 | && install -vm644 DESTDIR/usr/include/gnu/stubs-x32.h /usr/include/gnu/ \
|
---|
| 148 | || ln -v /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-x32.h
|
---|
| 149 | ln -svf ../usr/libx32/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2
|
---|
| 150 | ln -svf ../lib/locale /usr/libx32/locale</userinput></screen>
|
---|
| 151 | <!-- For whatever reason the stubs-x32.h doesn't get created. The 'ln' above is
|
---|
| 152 | just a "brute force" workaraound by copying the stubs-64.h file. -->
|
---|
| 153 |
|
---|
| 154 | <para>Configure the linker cache configuration:</para>
|
---|
| 155 |
|
---|
| 156 | <screen><userinput>echo "/usr/libx32" > /etc/ld.so.conf.d/libx32.conf
|
---|
| 157 | ldconfig</userinput></screen>
|
---|
| 158 |
|
---|
| 159 | <para>Do cleanup:</para>
|
---|
| 160 |
|
---|
| 161 | <screen><userinput>cd ..
|
---|
| 162 | rm -rf build</userinput></screen>
|
---|
| 163 |
|
---|
[d8fba27] | 164 | </sect2>
|
---|
| 165 |
|
---|
| 166 | <!-- ~~~~~~~~~~~~~~~~~~~~ Cleanup ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
| 167 |
|
---|
| 168 | <sect2 role="installation">
|
---|
| 169 | <title>Cleanup</title>
|
---|
| 170 |
|
---|
[8eb3fe4] | 171 | <para>Restore the file we moved temporarily away:</para>
|
---|
| 172 |
|
---|
| 173 | <screen><userinput remap="pre">mv /usr/include/limits.h{.backup,} </userinput></screen>
|
---|
| 174 |
|
---|
| 175 | </sect2>
|
---|
[d8fba27] | 176 |
|
---|
[8eb3fe4] | 177 | </sect1>
|
---|