Browse Source

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
Timothy Bauscher 23 years ago
parent
commit
54eee9df47
6 changed files with 34 additions and 16 deletions
  1. 8 0
      chapter01/changelog.xml
  2. 10 4
      chapter05/installasuser.xml
  3. 6 9
      chapter06/aboutdebug.xml
  4. 4 0
      chapter06/man-exp.xml
  5. 4 1
      chapter06/man-inst.xml
  6. 2 2
      index.xml

+ 8 - 0
chapter01/changelog.xml

@@ -52,6 +52,14 @@
 </itemizedlist>
 </itemizedlist>
 </para></listitem>
 </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:
 <listitem><para>August 30th, 2002 [timothy]: Chapter 06 - Makedev:
 Put rm /bin/bash after device creation. Perl: Removed information
 Put rm /bin/bash after device creation. Perl: Removed information
 about the old patch.</para></listitem>
 about the old patch.</para></listitem>

+ 10 - 4
chapter05/installasuser.xml

@@ -32,15 +32,16 @@ umask 022
 
 
 LFS=/mnt/lfs
 LFS=/mnt/lfs
 LC_ALL=POSIX
 LC_ALL=POSIX
-export LFS LC_ALL
+CC='gcc -s'
+export LFS LC_ALL CC
 EOF
 EOF
 source ~/.bash_profile</userinput></screen></para>
 source ~/.bash_profile</userinput></screen></para>
 
 
 <para>This profile makes sure the umask is set to 022 so newly created
 <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
 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>
 internationalization.</para>
 
 
 <para>When your host distribution uses a glibc version older than 2.2.4,
 <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
 is an alias for "POSIX") we ensure that everything will work as expected
 in the chroot environment.</para>
 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>
 </sect1>
 
 

+ 6 - 9
chapter06/aboutdebug.xml

@@ -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
 <para>To remove debugging symbols from a binary (must be an a.out or ELF
 binary) run <userinput>strip --strip-debug filename</userinput>. Wildcards
 binary) run <userinput>strip --strip-debug filename</userinput>. Wildcards
 can be used to strip debugging symbols from multiple files (use something 
 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
 <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>
 </sect1>
 
 

+ 4 - 0
chapter06/man-exp.xml

@@ -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
 ./configure command, we make sure that man doesn't use the /static versions
 of our programs.</para>
 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>
 </sect2>
 
 

+ 4 - 1
chapter06/man-inst.xml

@@ -4,8 +4,11 @@
 <para>Run the following commands to install man:</para>
 <para>Run the following commands to install man:</para>
 
 
 <para><screen><userinput>PATH=$PATH:/usr/bin:/bin \
 <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;
 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>
 make install</userinput></screen></para>
 
 
 <para>You may want to take a look at the man hint 
 <para>You may want to take a look at the man hint 

+ 2 - 2
index.xml

@@ -4,8 +4,8 @@
 
 
 <!ENTITY book SYSTEM "book/book.xml">
 <!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 ftp-root "ftp://ftp.linuxfromscratch.org">
 <!ENTITY http-root "http://ftp.linuxfromscratch.org">
 <!ENTITY http-root "http://ftp.linuxfromscratch.org">