Changeset aefc822 for chapter07/stripping.xml
- Timestamp:
- 06/11/2020 05:55:06 AM (4 years ago)
- Branches:
- 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, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 302d97a
- Parents:
- 387a32af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/stripping.xml
r387a32af raefc822 29 29 strip --strip-unneeded /tools/bin/*</userinput></screen> 30 30 31 <para>These commands will skip a number of files ,reporting that it does not31 <para>These commands will skip a number of files reporting that it does not 32 32 recognize their file format. Most of these are scripts instead of binaries. 33 Note that we use the <command>strip</command> program built in33 <!--Note that we use the <command>strip</command> program built in 34 34 <quote>Binutils pass 1</quote>, since it is the one that knows how to strip 35 our cross-compiled programs.</para> 36 <!-- Normally, the host "strip" could be used too, since it is actually the 37 same computer. But Some old versions of binutils may generate buggy crt1.o 38 and the like, because they do not know about recently introduced symbol 39 types. For more details, 40 see https://sourceware.org/bugzilla/show_bug.cgi?id=22875--> 35 our cross-compiled programs.--></para> 41 36 42 <para>Take care <emphasis> not</emphasis> to use37 <para>Take care <emphasis>NOT</emphasis> to use 43 38 <parameter>--strip-unneeded</parameter> on the libraries. The static 44 39 ones would be destroyed and the toolchain packages would need to be 45 40 built all over again.</para> 46 41 47 <para>To save more , remove the documentation:</para>42 <para>To save more space, remove the documentation:</para> 48 43 49 44 <screen><userinput>rm -rf /usr/{,share}/{info,man,doc}</userinput></screen> … … 51 46 <para>The libtool .la files are only useful when linking with static 52 47 libraries. They are unneeded, and potentially harmful, when using dynamic 53 shared libraries, specially when using alsonon-autotools build systems.48 shared libraries, specially when using non-autotools build systems. 54 49 Remove those files now:</para> 55 50 56 51 <screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput></screen> 57 52 58 <para>At this point, you should have at least 3 GB of free space in59 <envar>$LFS</envar>that can be used to build and install Glibc and Gcc in53 <para>At this point, you should have at least 5 GB of free space on the 54 chroot partition that can be used to build and install Glibc and Gcc in 60 55 the next phase. If you can build and install Glibc, you can build and install 61 the rest too.</para> 56 the rest too. You can check the free disk space with the command 57 <command>df -h /</command>.</para> 62 58 63 59 </sect2> … … 71 67 built packages, your temporary tools are in a good state and might be 72 68 backed up for later reuse. In case of fatal failures in the subsequent 73 sections, it often turns out that removing everything and starting over69 chapters, it often turns out that removing everything and starting over 74 70 (more carefully) is the best option to recover. Unfortunatly, all the 75 temporary tools will be removed, too. To avoid extra timeto redo71 temporary tools will be removed, too. To avoid the extra time needed to redo 76 72 something which has been built successfully, prepare a backup. 77 73 </para> … … 84 80 chroot environment is required as the backup should be stored 85 81 outside of the <filename class="directory">$LFS</filename> directory 86 but those cannot be accessed when in chroot. Leave chroot environment82 but those cannot be accessed when in chroot. Leave the chroot environment 87 83 and unmount the virtual kernel filesystems: 88 84 </para> … … 90 86 <screen role="nodump"><userinput>exit 91 87 umount $LFS/dev{/pts,} 92 umount $LFS/{sys,proc,run} 93 </userinput></screen> 88 umount $LFS/{sys,proc,run}</userinput></screen> 94 89 95 90 <para>Create the backup archive:</para> … … 99 94 100 95 <para> 101 In case you have to start over as some mistakes has been made, you can102 use this backup to restore the temporary tools and save some time on103 the way to recover.Since the sources are located under96 In case some mistakes have been made and you need to start over, you can 97 use this backup to restore the temporary tools and save some irecovery time. 98 Since the sources are located under 104 99 <filename class="directory">$LFS</filename>, they are included in the 105 100 backup archive as well, so you need not to download them again. After 106 checking that <filename class="directory">$LFS</filename> is set proper ,101 checking that <filename class="directory">$LFS</filename> is set properly, 107 102 restore the backup by executing the following commands: 108 103 </para> … … 114 109 115 110 <para> 116 Again, double check that the environment has been setup proper and117 continue building the rest of the system.111 Again, double check that the environment has been setup properly 112 and continue building the rest of the system. 118 113 </para> 119 114 … … 123 118 or restart building using a restore, remember to mount the 124 119 kernel virtual filesystems as described in <xref 125 linkend='ch-tools-kernfs'/> and enter the120 linkend='ch-tools-kernfs'/> and re-enter the 126 121 chroot environment (see <xref 127 122 linkend='ch-tools-chroot'/>) again before continuing.</para>
Note:
See TracChangeset
for help on using the changeset viewer.