[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1375d26] | 2 | <!DOCTYPE section [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[1375d26] | 6 | <section xmlns="http://docbook.org/docbook-ng"
|
---|
| 7 | xml:id="ch-tools-stripping">
|
---|
[673b0d8] | 8 | <title>Stripping</title>
|
---|
| 9 | <?dbhtml filename="stripping.html"?>
|
---|
| 10 |
|
---|
| 11 | <para>The steps in this section are optional, but if your LFS partition is
|
---|
| 12 | rather small, you will be glad to learn that you can remove some unnecessary
|
---|
| 13 | things. The executables and libraries you have built so far contain about 130
|
---|
| 14 | MB of unneeded debugging symbols. Remove those symbols with:</para>
|
---|
| 15 |
|
---|
| 16 | <screen><userinput>strip --strip-debug /tools/lib/*
|
---|
| 17 | strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
|
---|
| 18 |
|
---|
| 19 | <para>The last of the above commands will skip some twenty files, reporting
|
---|
| 20 | that it doesn't recognize their file format. Most of them are scripts instead
|
---|
| 21 | of binaries.</para>
|
---|
| 22 |
|
---|
| 23 | <para>Take care <emphasis>not</emphasis> to use
|
---|
[574b0ea] | 24 | <parameter>--strip-unneeded</parameter> on the libraries -- the static ones
|
---|
[673b0d8] | 25 | would be destroyed and you would have to build the three toolchain packages
|
---|
| 26 | all over again.</para>
|
---|
| 27 |
|
---|
| 28 | <para>To save another 30 MB, you can remove all the documentation:</para>
|
---|
| 29 |
|
---|
| 30 | <screen><userinput>rm -rf /tools/{doc,info,man}</userinput></screen>
|
---|
| 31 |
|
---|
| 32 | <para>You will now need to have at least 850 MB of free space on your LFS
|
---|
| 33 | file system to be able to build and install Glibc in the next phase. If you can
|
---|
| 34 | build and install Glibc, you can build and install the rest too.</para>
|
---|
| 35 |
|
---|
[1375d26] | 36 | </section>
|
---|