10.0
10.0-rc1
10.1
10.1-rc1
11.0
11.0-rc1
11.0-rc2
11.0-rc3
11.1
11.1-rc1
11.2
11.2-rc1
11.3
11.3-rc1
12.0
12.0-rc1
12.1
12.1-rc1
12.2
12.2-rc1
6.0
6.1
6.1.1
6.3
6.4
6.5
6.6
6.7
6.8
7.0
7.1
7.2
7.3
7.4
7.5
7.5-systemd
7.6
7.6-systemd
7.7
7.7-systemd
7.8
7.8-systemd
7.9
7.9-systemd
8.0
8.1
8.2
8.3
8.4
9.0
9.1
arm
bdubbs/gcc13
ml-11.0
multilib
renodr/libudev-from-systemd
s6-init
trunk
v5_0
v5_1
v5_1_1
xry111/arm64
xry111/arm64-12.0
xry111/clfs-ng
xry111/lfs-next
xry111/loongarch
xry111/loongarch-12.0
xry111/loongarch-12.1
xry111/loongarch-12.2
xry111/mips64el
xry111/multilib
xry111/pip3
xry111/rust-wip-20221008
xry111/update-glibc
Line | |
---|
1 | <chapter id="chapter05">
|
---|
2 | <title>Preparing the LFS system</title>
|
---|
3 | <?dbhtml filename="chapter05.html" dir="chapter05"?>
|
---|
4 |
|
---|
5 | &c5-introduction;
|
---|
6 | &c5-whystatic;
|
---|
7 | &c5-creatingstage1dir;
|
---|
8 | &c5-addinguser;
|
---|
9 | &c5-settingenviron;
|
---|
10 | &c5-binutils-pass1;
|
---|
11 | &c5-gcc-pass1;
|
---|
12 | &c5-kernelheaders;
|
---|
13 | &c5-glibc;
|
---|
14 | &c5-lockingglibc;
|
---|
15 | &c5-tcl;
|
---|
16 | &c5-expect;
|
---|
17 | &c5-dejagnu;
|
---|
18 | &c5-gcc-pass2;
|
---|
19 | &c5-binutils-pass2;
|
---|
20 | &c5-gawk;
|
---|
21 | &c5-coreutils;
|
---|
22 | &c5-bzip2;
|
---|
23 | &c5-gzip;
|
---|
24 | &c5-diffutils;
|
---|
25 | &c5-findutils;
|
---|
26 | &c5-make;
|
---|
27 | &c5-grep;
|
---|
28 | &c5-sed;
|
---|
29 | &c5-gettext;
|
---|
30 | &c5-ncurses;
|
---|
31 | &c5-patch;
|
---|
32 | &c5-tar;
|
---|
33 | &c5-texinfo;
|
---|
34 | &c5-bash;
|
---|
35 | &c5-utillinux;
|
---|
36 | &c5-perl;
|
---|
37 |
|
---|
38 |
|
---|
39 | <sect1 id="ch05-stripping">
|
---|
40 | <title>Stripping</title>
|
---|
41 | <?dbhtml filename="stripping.html" dir="chapter05"?>
|
---|
42 |
|
---|
43 | <para>If your LFS partition is rather small, you will be glad to learn that you
|
---|
44 | can throw away some unnecessary things. The executables and libraries you have
|
---|
45 | built so far contain about 130 MB of unneeded debugging symbols. Remove those
|
---|
46 | symbols like this:</para>
|
---|
47 |
|
---|
48 | <para><screen><userinput>strip --strip-unneeded /stage1/{,s}bin/*
|
---|
49 | strip --strip-debug /stage1/lib/*</userinput></screen></para>
|
---|
50 |
|
---|
51 | <para>The first of the above commands will skip some twenty files, reporting
|
---|
52 | that it doesn't recognize their file format. Most of them are scripts instead
|
---|
53 | of binaries.</para>
|
---|
54 |
|
---|
55 | <para>Take care <emphasis>not</emphasis> to use
|
---|
56 | <userinput>--strip-unneeded</userinput> on the libraries -- they would be
|
---|
57 | destroyed and you would have to build Glibc all over again.</para>
|
---|
58 |
|
---|
59 | <para>To save another couple of megabytes, you can throw away the documentation
|
---|
60 | and some of the bigger unneeded programs:</para>
|
---|
61 |
|
---|
62 | <para><screen><userinput>rm -r /stage1/share/{doc,info,man}
|
---|
63 | rm /stage1/bin/{addr2line,gprof,nm,size,strings,strip}</userinput></screen></para>
|
---|
64 |
|
---|
65 | <para>You will now need to have at least 700 MB of free space on your LFS
|
---|
66 | filesystem to be able to build and install Glibc in the next phase.</para>
|
---|
67 |
|
---|
68 | </sect1>
|
---|
69 |
|
---|
70 | </chapter>
|
---|
71 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.