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 |
|
---|
8 | <sect1 arch="ml_32,ml_x32,ml_all" id="ch-system-glibc-32" role="wrap">
|
---|
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 | <!--
|
---|
23 | <sect2 role="package">
|
---|
24 | <title/>
|
---|
25 |
|
---|
26 | <para>The Glibc package contains the main C library. This library provides
|
---|
27 | the basic routines for allocating memory, searching directories, opening and
|
---|
28 | closing files, reading and writing files, string handling, pattern matching,
|
---|
29 | arithmetic, and so on.</para>
|
---|
30 |
|
---|
31 | <segmentedlist>
|
---|
32 | <segtitle>&buildtime;</segtitle>
|
---|
33 | <segtitle>&diskspace;</segtitle>
|
---|
34 |
|
---|
35 | <seglistitem>
|
---|
36 | <seg>&glibc-ch6-sbu;</seg>
|
---|
37 | <seg>&glibc-ch6-du;</seg>
|
---|
38 | </seglistitem>
|
---|
39 | </segmentedlist>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 | -->
|
---|
43 |
|
---|
44 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
45 |
|
---|
46 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
47 | <title>Installation of Glibc - 32-bit</title>
|
---|
48 |
|
---|
49 | <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
|
---|
50 |
|
---|
51 | <para>Remove a file that may be left over from a previous build attempt:</para>
|
---|
52 |
|
---|
53 | <screen><userinput remap="pre">mv /usr/include/limits.h{,.backup} </userinput></screen>
|
---|
54 |
|
---|
55 | <para>The Glibc documentation recommends building Glibc
|
---|
56 | in a dedicated build directory:</para>
|
---|
57 |
|
---|
58 | <screen><userinput remap="pre">mkdir -v build
|
---|
59 | cd build</userinput></screen>
|
---|
60 |
|
---|
61 | <para>Prepare Glibc for compilation:</para>
|
---|
62 |
|
---|
63 | <screen><userinput remap="configure">CC="gcc -m32 -ffile-prefix-map=/tools=/usr -isystem /usr/include" \
|
---|
64 | CXX="g++ -m32 -ffile-prefix-map=/tools=/usr -isystem /usr/include" \
|
---|
65 | ../configure --prefix=/usr \
|
---|
66 | --disable-werror \
|
---|
67 | --enable-kernel=&min-kernel; \
|
---|
68 | --enable-stack-protector=strong \
|
---|
69 | --enable-multi-arch \
|
---|
70 | --libdir=/usr/lib32 \
|
---|
71 | --libexecdir=/usr/lib32 \
|
---|
72 | --with-headers=/usr/include \
|
---|
73 | libc_cv_slibdir=/usr/lib32 \
|
---|
74 | i686-pc-linux-gnu</userinput></screen>
|
---|
75 |
|
---|
76 | <para>Compile the package:</para>
|
---|
77 |
|
---|
78 | <screen><userinput remap="make">make</userinput></screen>
|
---|
79 |
|
---|
80 | <para>Install the package:</para>
|
---|
81 |
|
---|
82 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
|
---|
83 | make install_root=$PWD/DESTDIR install
|
---|
84 | mv -v DESTDIR/usr/lib32/* /usr/lib32/
|
---|
85 | install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \
|
---|
86 | /usr/include/gnu/
|
---|
87 | ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-linux.so.2
|
---|
88 | ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-lsb.so.3
|
---|
89 | ln -svf ../lib/locale /usr/lib32/locale</userinput></screen>
|
---|
90 |
|
---|
91 | <para>Configure the linker cache configuration:</para>
|
---|
92 |
|
---|
93 | <screen><userinput>echo "/usr/lib32" > /etc/ld.so.conf.d/lib32.conf
|
---|
94 | ldconfig</userinput></screen>
|
---|
95 |
|
---|
96 | <para>Do cleanup:</para>
|
---|
97 |
|
---|
98 | <screen><userinput>cd ..
|
---|
99 | rm -rf build</userinput></screen>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
104 |
|
---|
105 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
106 | <title>Glibc - x32-bit</title>
|
---|
107 |
|
---|
108 | <para>The Glibc documentation recommends building Glibc
|
---|
109 | in a dedicated build directory:</para>
|
---|
110 |
|
---|
111 | <screen><userinput remap="pre">mkdir -v build
|
---|
112 | cd build</userinput></screen>
|
---|
113 |
|
---|
114 | <para>Prepare Glibc for compilation:</para>
|
---|
115 |
|
---|
116 | <screen><userinput remap="configure">CC="gcc -mx32 -ffile-prefix-map=/tools=/usr -isystem /usr/include" \
|
---|
117 | CXX="g++ -mx32 -ffile-prefix-map=/tools=/usr -isystem /usr/include" \
|
---|
118 | ../configure --prefix=/usr \
|
---|
119 | --disable-werror \
|
---|
120 | --enable-kernel=&min-kernel; \
|
---|
121 | --enable-stack-protector=strong \
|
---|
122 | --enable-multi-arch \
|
---|
123 | --libdir=/usr/libx32 \
|
---|
124 | --with-headers=/usr/include \
|
---|
125 | libc_cv_slibdir=/usr/libx32 \
|
---|
126 | x86_64-pc-linux-gnux32</userinput></screen>
|
---|
127 |
|
---|
128 | <para>Compile the package:</para>
|
---|
129 |
|
---|
130 | <screen><userinput remap="make">make</userinput></screen>
|
---|
131 |
|
---|
132 | <para>Install the package:</para>
|
---|
133 |
|
---|
134 | <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
|
---|
135 | make install_root=$PWD/DESTDIR install
|
---|
136 | mv -v DESTDIR/usr/libx32/* /usr/libx32/
|
---|
137 | install -vm644 DESTDIR/usr/include/gnu/lib-names-x32.h /usr/include/gnu/
|
---|
138 | [ -e DESTDIR/usr/include/gnu/stubs-x32.h ] \
|
---|
139 | && install -vm644 DESTDIR/usr/include/gnu/stubs-x32.h /usr/include/gnu/ \
|
---|
140 | || ln -v /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-x32.h
|
---|
141 | ln -svf ../usr/libx32/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2
|
---|
142 | ln -svf ../lib/locale /usr/libx32/locale</userinput></screen>
|
---|
143 | <!-- For whatever reason the stubs-x32.h doesn't get created. The 'ln' above is
|
---|
144 | just a "brute force" workaraound by copying the stubs-64.h file. -->
|
---|
145 |
|
---|
146 | <para>Configure the linker cache configuration:</para>
|
---|
147 |
|
---|
148 | <screen><userinput>echo "/usr/libx32" > /etc/ld.so.conf.d/libx32.conf
|
---|
149 | ldconfig</userinput></screen>
|
---|
150 |
|
---|
151 | <para>Do cleanup:</para>
|
---|
152 |
|
---|
153 | <screen><userinput>cd ..
|
---|
154 | rm -rf build</userinput></screen>
|
---|
155 |
|
---|
156 | <para>Restore the file we moved temporarily away:</para>
|
---|
157 |
|
---|
158 | <screen><userinput remap="pre">mv /usr/include/limits.h{.backup,} </userinput></screen>
|
---|
159 |
|
---|
160 | </sect2>
|
---|
161 |
|
---|
162 | </sect1>
|
---|
163 |
|
---|