Fix man bug, added a CC variable to omit symbols from compilation in static packages.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2077 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Timothy Bauscher 2002-09-02 00:01:22 +00:00
parent d0e55a67df
commit 54eee9df47
6 changed files with 34 additions and 16 deletions

View File

@ -52,6 +52,14 @@
</itemizedlist>
</para></listitem>
<listitem><para>September 1st, 2002 [timothy]: Chapter 06 - About
debugging symbols: Removed info. about stripping /static. Man: Added sed
statement to prevent groff from using SGR escape sequences.</para></listitem>
<listitem><para>September 1st, 2002 [timothy]: Chapter 05 - Install all
software as an unprivileged user: Added $CC='gcc -s' to omit the
compilation of symbols in static packages.</para></listitem>
<listitem><para>August 30th, 2002 [timothy]: Chapter 06 - Makedev:
Put rm /bin/bash after device creation. Perl: Removed information
about the old patch.</para></listitem>

View File

@ -32,15 +32,16 @@ umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
export LFS LC_ALL
CC='gcc -s'
export LFS LC_ALL CC
EOF
source ~/.bash_profile</userinput></screen></para>
<para>This profile makes sure the umask is set to 022 so newly created
files and directories will have the correct permissions. It is advisable
to keep this setting throughout your LFS installation. Also, the $LFS
and $LC_ALL environment variables are set. $LFS has been explained in
previous chapters already. $LC_ALL is a variable that is used for
to keep this setting throughout your LFS installation. Also, the $LFS,
$LC_ALL, and $CC environment variables are set. $LFS has been explained
in previous chapters already. $LC_ALL is a variable that is used for
internationalization.</para>
<para>When your host distribution uses a glibc version older than 2.2.4,
@ -50,5 +51,10 @@ of chapter 6 and try to return to it. By setting this to "POSIX" ("C"
is an alias for "POSIX") we ensure that everything will work as expected
in the chroot environment.</para>
<para>$CC is a variable we set in order to prevent debugging symbols from
being compiled into our static packages. By omitting these symbols during
the linking stage of compilation, we save hard drive space and decrease
our the build time.</para>
</sect1>

View File

@ -37,17 +37,14 @@ similar if you compare programs with and without debugging symbols.</para>
<para>To remove debugging symbols from a binary (must be an a.out or ELF
binary) run <userinput>strip --strip-debug filename</userinput>. Wildcards
can be used to strip debugging symbols from multiple files (use something
like <userinput>strip --strip-debug $LFS/usr/bin/*</userinput>).
Most people will probably never use a debugger on software, so by
removing those symbols a lot of disk space can be regained.</para>
like <userinput>strip --strip-debug $LFS/usr/bin/*</userinput>). Most
people will probably never use a debugger on software, so by removing
those symbols a lot of disk space can be regained.</para>
<para>For your convenience, chapter 9 includes one simple command to strip
all debugging symbols from all programs and libraries on your
system. If you are short on diskspace you can start with stripping
all the files under <filename class="directory">$LFS/static</filename></para>
<para>You might find additional information in the optimization hint which can
be found at <ulink url="&hints-root;optimization.txt"/>.</para>
all debugging symbols from the programs and libraries on your system. You
might find additional information in the optimization hint which can be
found at <ulink url="&hints-root;optimization.txt"/>.</para>
</sect1>

View File

@ -8,5 +8,9 @@ where a program is found. By appending /usr/bin:/bin to PATH for the
./configure command, we make sure that man doesn't use the /static versions
of our programs.</para>
<para><userinput>sed -e '/^NROFF/s/-mandoc/-c -mandoc/'</userinput>:
This prevents groff from using SGR (Set Graphics Rendition) escape
sequences on our man pages.</para>
</sect2>

View File

@ -4,8 +4,11 @@
<para>Run the following commands to install man:</para>
<para><screen><userinput>PATH=$PATH:/usr/bin:/bin \
&nbsp;&nbsp;&nbsp;&nbsp;./configure -default -confdir=/etc &&
&nbsp;&nbsp;&nbsp;&nbsp;./configure -default -confdir=/etc &amp;&amp;
make &amp;&amp;
cp src/man.conf{,.backup} &amp;&amp;
sed -e '/^NROFF/s/-mandoc/-c -mandoc/' \
&nbsp;&nbsp;&nbsp;&nbsp;src/man.conf.backup > src/man.conf &amp;&amp;
make install</userinput></screen></para>
<para>You may want to take a look at the man hint

View File

@ -4,8 +4,8 @@
<!ENTITY book SYSTEM "book/book.xml">
<!ENTITY version "20020831">
<!ENTITY releasedate "August 31th, 2002">
<!ENTITY version "20020901">
<!ENTITY releasedate "September 1st, 2002">
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
<!ENTITY http-root "http://ftp.linuxfromscratch.org">