replace sed with option to gcc

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@974 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Mark Hymers 2001-08-15 13:00:49 +00:00
parent 8f5efb6200
commit 811364d703
2 changed files with 10 additions and 3 deletions

View File

@ -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>

View File

@ -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>