removed all non-essential CFLAGS and LDFLAGS

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Gerard Beekmans 2003-05-10 23:48:26 +00:00
parent a5b2aa952e
commit 84a7dc232d
29 changed files with 55 additions and 63 deletions

View File

@ -63,6 +63,10 @@
</itemizedlist> </itemizedlist>
</para></listitem> </para></listitem>
<listitem><para>May 10th, 2003 [gerard]: Removed all CFLAGS and LDFLAGS
variables where they are not essential (so, not including static binutils,
gcc and compiling zlib with -fPIC).</para></listitem>
<listitem><para>May 10th, 2003 [gerard]: Chapter 05 - Binutils (pass1, <listitem><para>May 10th, 2003 [gerard]: Chapter 05 - Binutils (pass1,
pass2, locking glibc and adjusting toolchain): Change tooldir to /stage1 pass2, locking glibc and adjusting toolchain): Change tooldir to /stage1
(likewise we use tooldir=/usr in chapter 6).</para></listitem> (likewise we use tooldir=/usr in chapter 6).</para></listitem>

View File

@ -3,9 +3,9 @@
<sect2> <sect2>
<title>Installation of Bash</title> <title>Installation of Bash</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \ <para><screen><userinput>./configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-curses --without-bash-malloc &nbsp;&nbsp;&nbsp;&nbsp;--with-curses --without-bash-malloc
make LDFLAGS="-s" make
make tests make tests
make install make install
ln -s bash /stage1/bin/sh</userinput></screen></para> ln -s bash /stage1/bin/sh</userinput></screen></para>

View File

@ -17,8 +17,7 @@ cd ../binutils-build</userinput></screen></para>
<para>Next, prepare Binutils to be compiled:</para> <para>Next, prepare Binutils to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;--prefix=/stage1 --disable-nls</userinput></screen></para> &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/stage1 --disable-nls</userinput></screen></para>
<para>The meaning of the (new) configure switches are:</para> <para>The meaning of the (new) configure switches are:</para>
@ -32,7 +31,7 @@ statically.</para></listitem>
<para>Continue with compiling the package:</para> <para>Continue with compiling the package:</para>
<para><screen><userinput>make tooldir=/stage1 LDFLAGS="-all-static -s"</userinput></screen></para> <para><screen><userinput>make tooldir=/stage1 LDFLAGS="-all-static"</userinput></screen></para>
<para>The meaning of the make option is:</para> <para>The meaning of the make option is:</para>

View File

@ -6,9 +6,9 @@
<para><screen><userinput>patch -Np1 -i ../binutils-&binutils-version;-lib-path.patch <para><screen><userinput>patch -Np1 -i ../binutils-&binutils-version;-lib-path.patch
mkdir ../binutils-build mkdir ../binutils-build
cd ../binutils-build cd ../binutils-build
CFLAGS="-O2 -pipe" ../binutils-&binutils-version;/configure --prefix=/stage1 \ ../binutils-&binutils-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/stage1/lib &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/stage1/lib
make tooldir=/stage1 LDFLAGS="-s" make tooldir=/stage1
make tooldir=/stage1 check make tooldir=/stage1 check
make tooldir=/stage1 install</userinput></screen></para> make tooldir=/stage1 install</userinput></screen></para>

View File

@ -9,7 +9,7 @@ program and start compiling, with a few variables changed to suit our
environment:</para> environment:</para>
<para><screen><userinput>make -f Makefile-libbz2_so <para><screen><userinput>make -f Makefile-libbz2_so
make LDFLAGS="-s" make
make check make check
make PREFIX=/stage1 install make PREFIX=/stage1 install
yes | cp bzip2-shared /stage1/bin/bzip2 yes | cp bzip2-shared /stage1/bin/bzip2

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Coreutils</title> <title>Installation of Coreutils</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check-root make check-root
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -3,7 +3,7 @@
<sect2> <sect2>
<title>Installation of DejaGNU</title> <title>Installation of DejaGNU</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -5,8 +5,8 @@
<para>Prepare Diffutils to be compiled:</para> <para>Prepare Diffutils to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make install</userinput></screen></para> make install</userinput></screen></para>
</sect2> </sect2>

View File

@ -4,9 +4,9 @@
<title>Installation of Expect</title> <title>Installation of Expect</title>
<para><screen><userinput>patch -Np1 -i ../expect-&expect-version;.patch <para><screen><userinput>patch -Np1 -i ../expect-&expect-version;.patch
CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 --with-tcl=/stage1/lib \ ./configure --prefix=/stage1 --with-tcl=/stage1/lib \
&nbsp;&nbsp;&nbsp;&nbsp;--with-x=no --disable-symbols --cache-file=/dev/null &nbsp;&nbsp;&nbsp;&nbsp;--with-x=no --disable-symbols --cache-file=/dev/null
make LDFLAGS="-s" make
make test make test
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -29,8 +29,8 @@ This patch adds this macro to the source code.</para></listitem>
<para>Prepare Findutils to be compiled:</para> <para>Prepare Findutils to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -5,12 +5,11 @@
<para>Prepare Gawk to be compiled:</para> <para>Prepare Gawk to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>./configure --prefix=/stage1</userinput></screen></para>
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1</userinput></screen></para>
<para>Continue with compiling the package:</para> <para>Continue with compiling the package:</para>
<para><screen><userinput>make LDFLAGS="-s"</userinput></screen></para> <para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para> <para>And finish off installing the package:</para>

View File

@ -23,8 +23,7 @@ cd ../gcc-build</userinput></screen></para>
<para>Prepare GCC to be compiled:</para> <para>Prepare GCC to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \ &nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --enable-shared \ &nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --enable-shared \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c</userinput></screen></para> &nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c</userinput></screen></para>
@ -54,9 +53,7 @@ correctly.</para></listitem>
<para>Continue with compiling the package:</para> <para>Continue with compiling the package:</para>
<para><screen><userinput>make BOOT_LDFLAGS="-static -s" \ <para><screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen></para>
&nbsp;&nbsp;&nbsp;&nbsp;BOOT_CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;STAGE1_CFLAGS="-pipe" bootstrap</userinput></screen></para>
<para>The meaning of the make options are:</para> <para>The meaning of the make options are:</para>

View File

@ -10,13 +10,12 @@ patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch</userinput></screen></pa
<para><screen><userinput>mkdir ../gcc-build <para><screen><userinput>mkdir ../gcc-build
cd ../gcc-build</userinput></screen></para> cd ../gcc-build</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \ <para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \ &nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-clocale=gnu --enable-shared \ &nbsp;&nbsp;&nbsp;&nbsp;--enable-clocale=gnu --enable-shared \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix --enable-__cxa_atexit \ &nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix --enable-__cxa_atexit \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c,c++ &nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c,c++
make LDFLAGS="-s" make
make -k check make -k check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Gettext</title> <title>Installation of Gettext</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 &amp;&amp; <para><screen><userinput>./configure --prefix=/stage1 &amp;&amp;
make LDFLAGS="-s" &amp;&amp; make &amp;&amp;
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -25,8 +25,7 @@ cd ../glibc-build</userinput></screen></para>
<para>Next, prepare Glibc to be compiled:</para> <para>Next, prepare Glibc to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \ &nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
&nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/stage1/include \ &nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/stage1/include \
&nbsp;&nbsp;&nbsp;&nbsp;--with-binutils=/stage1/bin \ &nbsp;&nbsp;&nbsp;&nbsp;--with-binutils=/stage1/bin \

View File

@ -3,9 +3,9 @@
<sect2> <sect2>
<title>Installation of Grep</title> <title>Installation of Grep</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \ <para><screen><userinput>./configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-perl-regexp --with-included-regex &nbsp;&nbsp;&nbsp;&nbsp;--disable-perl-regexp --with-included-regex
make LDFLAGS="-s" make
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Gzip</title> <title>Installation of Gzip</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install make install
rm -f /stage1/bin/{gunzip,zcat} rm -f /stage1/bin/{gunzip,zcat}

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Make</title> <title>Installation of Make</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -3,9 +3,8 @@
<sect2> <sect2>
<title>Installation of Patch</title> <title>Installation of Patch</title>
<para><screen><userinput>CPPFLAGS=-D_GNU_SOURCE CFLAGS="-O2 -pipe" \ <para><screen><userinput>./configure --prefix=/stage1
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1 make
make LDFLAGS="-s"
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -3,7 +3,7 @@
<title>Installation of Perl</title> <title>Installation of Perl</title>
<para><screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc.patch <para><screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc.patch
./configure.gnu --prefix=/stage1 -Doptimize='-O2 -pipe' &amp;&amp; ./configure.gnu --prefix=/stage1 &amp;&amp;
make perl make perl
make utilities &amp;&amp; make utilities &amp;&amp;
cp perl /stage1/bin/perl &amp;&amp; cp perl /stage1/bin/perl &amp;&amp;

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Sed</title> <title>Installation of Sed</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -10,7 +10,6 @@ set +h
umask 022 umask 022
LFS=/mnt/lfs LFS=/mnt/lfs
LC_ALL=POSIX LC_ALL=POSIX
LDFLAGS="-s"
PATH=/stage1/bin:$PATH PATH=/stage1/bin:$PATH
export LFS LC_ALL LDFLAGS PATH export LFS LC_ALL LDFLAGS PATH
EOF EOF

View File

@ -12,8 +12,8 @@ used for gzip files.</para>
<para><screen><userinput>patch -Np1 -i ../tar-&tar-patch-version;.patch</userinput></screen></para> <para><screen><userinput>patch -Np1 -i ../tar-&tar-patch-version;.patch</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install</userinput></screen></para> make install</userinput></screen></para>

View File

@ -4,8 +4,8 @@
<title>Installation of TCL</title> <title>Installation of TCL</title>
<para><screen><userinput>cd unix <para><screen><userinput>cd unix
CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 ./configure --prefix=/stage1
make LDFLAGS="-s" make
make test make test
make install make install
ln -s tclsh8.4 /stage1/bin/tclsh</userinput></screen></para> ln -s tclsh8.4 /stage1/bin/tclsh</userinput></screen></para>

View File

@ -3,8 +3,8 @@
<sect2> <sect2>
<title>Installation of Texinfo</title> <title>Installation of Texinfo</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 <para><screen><userinput>./configure --prefix=/stage1
make LDFLAGS="-s" make
make check make check
make install make install
make TEXMF=/stage1/share/texmf install-tex</userinput></screen></para> make TEXMF=/stage1/share/texmf install-tex</userinput></screen></para>

View File

@ -3,10 +3,10 @@
<sect2> <sect2>
<title>Installation of Util-linux</title> <title>Installation of Util-linux</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure <para><screen><userinput>./configure
make -C lib LDFLAGS="-s" make -C lib
make -C mount LDFLAGS="-s" mount umount make -C mount mount umount
make -C text-utils LDFLAGS="-s" more make -C text-utils more
cp mount/{mount,umount} /stage1/bin cp mount/{mount,umount} /stage1/bin
cp text-utils/more /stage1/bin</userinput></screen></para> cp text-utils/more /stage1/bin</userinput></screen></para>

View File

@ -16,14 +16,13 @@ cd ../binutils-build</userinput></screen></para>
<para>Next, prepare Binutils to be compiled:</para> <para>Next, prepare Binutils to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --mandir=/usr/share/man \ &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --mandir=/usr/share/man \
&nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info --enable-shared</userinput></screen></para> &nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info --enable-shared</userinput></screen></para>
<para>Continue with compiling the package:</para> <para>Continue with compiling the package:</para>
<para><screen><userinput>make tooldir=/usr LDFLAGS="-s"</userinput></screen></para> <para><screen><userinput>make tooldir=/usr</userinput></screen></para>
<para><screen><userinput>make check</userinput></screen></para> <para><screen><userinput>make check</userinput></screen></para>

View File

@ -26,8 +26,7 @@ cd ../gcc-build</userinput></screen></para>
<para>Prepare GCC to be compiled:</para> <para>Prepare GCC to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \ <para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-threads=posix \ &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-threads=posix \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-__cxa_atexit --enable-clocale=gnu \ &nbsp;&nbsp;&nbsp;&nbsp;--enable-__cxa_atexit --enable-clocale=gnu \
&nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man \ &nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man \
@ -55,7 +54,7 @@ is implemented.</para></listitem>
<para>Continue with compiling the package:</para> <para>Continue with compiling the package:</para>
<para><screen><userinput>make LDFLAGS="-s"</userinput></screen></para> <para><screen><userinput>make</userinput></screen></para>
<para><screen><userinput>make -k check</userinput></screen></para> <para><screen><userinput>make -k check</userinput></screen></para>

View File

@ -11,8 +11,7 @@ cd ../glibc-build</userinput></screen></para>
<para>Next, prepare Glibc to be compiled:</para> <para>Next, prepare Glibc to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \ <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \ &nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin \ &nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin \
&nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/usr/include \ &nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/usr/include \