Bladeren bron

removed all non-essential CFLAGS and LDFLAGS

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Gerard Beekmans 22 jaren geleden
bovenliggende
commit
84a7dc232d

+ 4 - 0
chapter01/changelog.xml

@@ -63,6 +63,10 @@
 </itemizedlist>
 </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,
 pass2, locking glibc and adjusting toolchain): Change tooldir to /stage1
 (likewise we use tooldir=/usr in chapter 6).</para></listitem>

+ 2 - 2
chapter05/bash-inst.xml

@@ -3,9 +3,9 @@
 <sect2>
 <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
-make LDFLAGS="-s"
+make
 make tests
 make install
 ln -s bash /stage1/bin/sh</userinput></screen></para>

+ 2 - 3
chapter05/binutils-pass1-inst.xml

@@ -17,8 +17,7 @@ cd ../binutils-build</userinput></screen></para>
 
 <para>Next, prepare Binutils to be compiled:</para>
 
-<para><screen><userinput>CFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
+<para><screen><userinput>../binutils-&binutils-version;/configure \
 &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/stage1 --disable-nls</userinput></screen></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><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>
 

+ 2 - 2
chapter05/binutils-pass2-inst.xml

@@ -6,9 +6,9 @@
 <para><screen><userinput>patch -Np1 -i ../binutils-&binutils-version;-lib-path.patch
 mkdir ../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
-make tooldir=/stage1 LDFLAGS="-s"
+make tooldir=/stage1
 make tooldir=/stage1 check
 make tooldir=/stage1 install</userinput></screen></para>
 

+ 1 - 1
chapter05/bzip2-inst.xml

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

+ 2 - 2
chapter05/coreutils-inst.xml

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

+ 1 - 1
chapter05/dejagnu-inst.xml

@@ -3,7 +3,7 @@
 <sect2>
 <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>
 
 

+ 2 - 2
chapter05/diffutils-inst.xml

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

+ 2 - 2
chapter05/expect-inst.xml

@@ -4,9 +4,9 @@
 <title>Installation of Expect</title>
 
 <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
-make LDFLAGS="-s"
+make
 make test
 make install</userinput></screen></para>
 

+ 2 - 2
chapter05/findutils-inst.xml

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

+ 2 - 3
chapter05/gawk-inst.xml

@@ -5,12 +5,11 @@
 
 <para>Prepare Gawk to be compiled:</para>
 
-<para><screen><userinput>CFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1</userinput></screen></para>
+<para><screen><userinput>./configure --prefix=/stage1</userinput></screen></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>
 

+ 2 - 5
chapter05/gcc-pass1-inst.xml

@@ -23,8 +23,7 @@ cd ../gcc-build</userinput></screen></para>
 
 <para>Prepare GCC to be compiled:</para>
 
-<para><screen><userinput>CFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/stage1 \
+<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/stage1 \
 &nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \
 &nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --enable-shared \
 &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><screen><userinput>make BOOT_LDFLAGS="-static -s" \
-&nbsp;&nbsp;&nbsp;&nbsp;BOOT_CFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;STAGE1_CFLAGS="-pipe" bootstrap</userinput></screen></para>
+<para><screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen></para>
 
 <para>The meaning of the make options are:</para>
 

+ 2 - 3
chapter05/gcc-pass2-inst.xml

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

+ 2 - 2
chapter05/gettext-inst.xml

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

+ 1 - 2
chapter05/glibc-inst.xml

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

+ 2 - 2
chapter05/grep-inst.xml

@@ -3,9 +3,9 @@
 <sect2>
 <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
-make LDFLAGS="-s"
+make 
 make check
 make install</userinput></screen></para>
 

+ 2 - 2
chapter05/gzip-inst.xml

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

+ 2 - 2
chapter05/make-inst.xml

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

+ 2 - 3
chapter05/patch-inst.xml

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

+ 1 - 1
chapter05/perl-inst.xml

@@ -3,7 +3,7 @@
 <title>Installation of Perl</title>
 
 <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 utilities &amp;&amp;
 cp perl /stage1/bin/perl &amp;&amp;

+ 2 - 2
chapter05/sed-inst.xml

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

+ 0 - 1
chapter05/setting-environment.xml

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

+ 2 - 2
chapter05/tar-inst.xml

@@ -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>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
-make LDFLAGS="-s"
+<para><screen><userinput>./configure --prefix=/stage1
+make 
 make check
 make install</userinput></screen></para>
 

+ 2 - 2
chapter05/tcl-inst.xml

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

+ 2 - 2
chapter05/texinfo-inst.xml

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

+ 4 - 4
chapter05/utillinux-inst.xml

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

+ 2 - 3
chapter06/binutils-inst.xml

@@ -16,14 +16,13 @@ cd ../binutils-build</userinput></screen></para>
 
 <para>Next, prepare Binutils to be compiled:</para>
 
-<para><screen><userinput>CFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
+<para><screen><userinput>../binutils-&binutils-version;/configure \
 &nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --mandir=/usr/share/man \
 &nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info --enable-shared</userinput></screen></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>
 

+ 2 - 3
chapter06/gcc-inst.xml

@@ -26,8 +26,7 @@ cd ../gcc-build</userinput></screen></para>
 
 <para>Prepare GCC to be compiled:</para>
 
-<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \
-&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/usr \
+<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
 &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-threads=posix \
 &nbsp;&nbsp;&nbsp;&nbsp;--enable-__cxa_atexit --enable-clocale=gnu \
 &nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man \
@@ -55,7 +54,7 @@ is implemented.</para></listitem>
 
 <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>
 

+ 1 - 2
chapter06/glibc-inst.xml

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