Browse Source

replace sed with option to gcc

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@974 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Mark Hymers 24 years ago
parent
commit
811364d703
2 changed files with 10 additions and 3 deletions
  1. 9 0
      chapter05/bzip2-exp.xml
  2. 1 3
      chapter05/bzip2-inst.xml

+ 9 - 0
chapter05/bzip2-exp.xml

@@ -1,6 +1,7 @@
 <sect2>
 <title>Command explanations</title>
 
+<!--
 <para><userinput>sed: </userinput> The sed command here searches for the
 string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS)
 $(LDFLAGS) -o" in the Makefile file. We make that modification so it
@@ -23,5 +24,13 @@ link a package statically. This is also the most common way.
 The -all-static value is only used with the binutils package and won't 
 be used throughout the rest of this book.</para>
 
+I HAVEN'T REMOVED THIS AS WE MAY NEED TO COPY SOME OF IT TO A LATER
+PACKAGE.  IS THIS THE CASE?
+
+-->
+
+<para><userinput>make CC="gcc -static": </userinput>This is the method
+we use to tell gcc that we want bzip2 to be linked statically.</para>
+
 </sect2>
 

+ 1 - 3
chapter05/bzip2-inst.xml

@@ -3,9 +3,7 @@
 
 <para>Install Bzip2 by running the following commands:</para>
 
-<para><screen><userinput>sed \</userinput>
-<userinput>&nbsp;&nbsp;&nbsp;s/"\$(CC) \$(CFLAGS) -o"/"\$(CC) \$(CFLAGS) \$(LDFLAGS) -o"/ \</userinput>
-<userinput>&nbsp;&nbsp;&nbsp;Makefile | make -f - LDFLAGS=-static &amp;&amp;</userinput>
+<para><screen><userinput>make CC="gcc -static" &amp;&amp;</userinput>
 <userinput>make PREFIX=$LFS/usr install &amp;&amp;</userinput>
 <userinput>cd $LFS/usr/bin &amp;&amp;</userinput>
 <userinput>mv bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para>