blob: 122f37ac258d8ff90b130aa0d3aec1e79e9937cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
<sect2>
<title>Installation of Glibc</title>
<para>
Unpack the glibc-crypt and glibc-linuxthreads in the glibc-2.1.3
directory, not in $LFS/usr/src. Don't enter the created directories. Just
unpack them and leave it with that.
</para>
<para>
A few default parameters of Glibc need to be changed, such as the
directory where the shared libraries are supposed to be installed in and
the directory that contains the system configuration files. For this
purpose you need to create the <filename class="directory">
$LFS/usr/src/glibc-build</filename> directory and cd into that directory
with:
</para>
<blockquote><literallayout>
<userinput>mkdir $LFS/usr/src/glibc-build &&</userinput>
<userinput>cd $LFS/usr/src/glibc-build</userinput>
</literallayout></blockquote>
<para>
In that directory you create a new file <filename>configparms</filename>
by running the following:
</para>
<literallayout>
<userinput>cat > configparms << "EOF"</userinput>
# Begin configparms
slibdir=/lib
sysconfdir=/etc
# End configparms
<userinput>EOF</userinput>
</literallayout>
<para>
Before we actually install Glibc you need to unpack the Glibc patch
file.
</para>
<para>
Please note that the configure script of Glibc may complain about
certain files in the /usr/include directory being too old and will be
replaced, or that some symlink is not supposed to be there anymore (like
the /usr/include/scsi symlink that's present on older Linux systems). If
it asks you to move a symlink like scsi out of the way, please do so. If
it says it will replace old files by the newer Glibc files you can
ignore that. Glibc does not know that it will end up on $LFS when the
configure script is run.
</para>
<para>
If your system had already a suitable GCC version installed, change to the
<filename class="directory">$LFS/usr/src/glibc-build</filename>
directory and install Glibc by running the following
commands:
</para>
<blockquote><literallayout>
<userinput>cd ../glibc-2.1.3 &&</userinput>
<userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
<userinput>cd $LFS/usr/src/glibc-build &&</userinput>
<userinput>../glibc-2.1.3/configure \</userinput>
<userinput> --prefix=/usr --enable-add-ons
\</userinput>
<userinput> --with-headers=$LFS/usr/include
\</userinput>
<userinput> --libexecdir=/usr/bin &&
</userinput>
<userinput>make &&</userinput>
<userinput>make install_root=$LFS install &&</userinput>
<userinput>make install_root=$LFS localedata/install-locales</userinput>
</literallayout></blockquote>
<para>
If your system didn't have a suitable GCC version installed, change to the
<filename class="directory">$LFS/usr/src/glibc-build</filename>
directory and install Glibc using the gcc-2.95.2 you just installed by
running the following commands:
</para>
<blockquote><literallayout>
<userinput>cd ../glibc-2.1.3 &&</userinput>
<userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
<userinput>cd $LFS/usr/src/glibc-build &&</userinput>
<userinput>CC=/usr/local/gcc2952/bin/gcc \</userinput>
<userinput> ../glibc-2.1.3/configure --prefix=/usr
--enable-add-ons \</userinput>
<userinput> --with-headers=$LFS/usr/include \
</userinput>
<userinput> --libexecdir=/usr/bin &&
</userinput>
<userinput>make &&</userinput>
<userinput>make install_root=$LFS install &&</userinput>
<userinput>make install_root=$LFS localedata/install-locales</userinput>
</literallayout></blockquote>
</sect2>
|