From 84a7dc232d8d21a757b84cbea5f41292a90344f8 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 10 May 2003 23:48:26 +0000 Subject: [PATCH] removed all non-essential CFLAGS and LDFLAGS git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 4 ++++ chapter05/bash-inst.xml | 4 ++-- chapter05/binutils-pass1-inst.xml | 5 ++--- chapter05/binutils-pass2-inst.xml | 4 ++-- chapter05/bzip2-inst.xml | 2 +- chapter05/coreutils-inst.xml | 4 ++-- chapter05/dejagnu-inst.xml | 2 +- chapter05/diffutils-inst.xml | 4 ++-- chapter05/expect-inst.xml | 4 ++-- chapter05/findutils-inst.xml | 4 ++-- chapter05/gawk-inst.xml | 5 ++--- chapter05/gcc-pass1-inst.xml | 7 ++----- chapter05/gcc-pass2-inst.xml | 5 ++--- chapter05/gettext-inst.xml | 4 ++-- chapter05/glibc-inst.xml | 3 +-- chapter05/grep-inst.xml | 4 ++-- chapter05/gzip-inst.xml | 4 ++-- chapter05/make-inst.xml | 4 ++-- chapter05/patch-inst.xml | 5 ++--- chapter05/perl-inst.xml | 2 +- chapter05/sed-inst.xml | 4 ++-- chapter05/setting-environment.xml | 1 - chapter05/tar-inst.xml | 4 ++-- chapter05/tcl-inst.xml | 4 ++-- chapter05/texinfo-inst.xml | 4 ++-- chapter05/utillinux-inst.xml | 8 ++++---- chapter06/binutils-inst.xml | 5 ++--- chapter06/gcc-inst.xml | 5 ++--- chapter06/glibc-inst.xml | 3 +-- 29 files changed, 55 insertions(+), 63 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 65e5e802f..0c1833bc7 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -63,6 +63,10 @@ +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). + 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). diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml index e9dbd6197..7a0d7da55 100644 --- a/chapter05/bash-inst.xml +++ b/chapter05/bash-inst.xml @@ -3,9 +3,9 @@ Installation of Bash -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \ +./configure --prefix=/stage1 \     --with-curses --without-bash-malloc -make LDFLAGS="-s" +make make tests make install ln -s bash /stage1/bin/sh diff --git a/chapter05/binutils-pass1-inst.xml b/chapter05/binutils-pass1-inst.xml index 7aaeb37ca..1d97f1cfe 100644 --- a/chapter05/binutils-pass1-inst.xml +++ b/chapter05/binutils-pass1-inst.xml @@ -17,8 +17,7 @@ cd ../binutils-build Next, prepare Binutils to be compiled: -CFLAGS="-O2 -pipe" \ -    ../binutils-&binutils-version;/configure \ +../binutils-&binutils-version;/configure \     --prefix=/stage1 --disable-nls The meaning of the (new) configure switches are: @@ -32,7 +31,7 @@ statically. Continue with compiling the package: -make tooldir=/stage1 LDFLAGS="-all-static -s" +make tooldir=/stage1 LDFLAGS="-all-static" The meaning of the make option is: diff --git a/chapter05/binutils-pass2-inst.xml b/chapter05/binutils-pass2-inst.xml index 22eadeceb..f12db20a4 100644 --- a/chapter05/binutils-pass2-inst.xml +++ b/chapter05/binutils-pass2-inst.xml @@ -6,9 +6,9 @@ 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 \     --enable-shared --with-lib-path=/stage1/lib -make tooldir=/stage1 LDFLAGS="-s" +make tooldir=/stage1 make tooldir=/stage1 check make tooldir=/stage1 install diff --git a/chapter05/bzip2-inst.xml b/chapter05/bzip2-inst.xml index c7d383142..04ce1f3f6 100644 --- a/chapter05/bzip2-inst.xml +++ b/chapter05/bzip2-inst.xml @@ -9,7 +9,7 @@ program and start compiling, with a few variables changed to suit our environment: make -f Makefile-libbz2_so -make LDFLAGS="-s" +make make check make PREFIX=/stage1 install yes | cp bzip2-shared /stage1/bin/bzip2 diff --git a/chapter05/coreutils-inst.xml b/chapter05/coreutils-inst.xml index bb5e5f22b..dee650d33 100644 --- a/chapter05/coreutils-inst.xml +++ b/chapter05/coreutils-inst.xml @@ -3,8 +3,8 @@ Installation of Coreutils -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check-root make install diff --git a/chapter05/dejagnu-inst.xml b/chapter05/dejagnu-inst.xml index f91178a8a..511573c56 100644 --- a/chapter05/dejagnu-inst.xml +++ b/chapter05/dejagnu-inst.xml @@ -3,7 +3,7 @@ Installation of DejaGNU -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 +./configure --prefix=/stage1 make install diff --git a/chapter05/diffutils-inst.xml b/chapter05/diffutils-inst.xml index e81ab5ef7..cbfbb0264 100644 --- a/chapter05/diffutils-inst.xml +++ b/chapter05/diffutils-inst.xml @@ -5,8 +5,8 @@ Prepare Diffutils to be compiled: -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make install diff --git a/chapter05/expect-inst.xml b/chapter05/expect-inst.xml index 4d893a11a..1df296566 100644 --- a/chapter05/expect-inst.xml +++ b/chapter05/expect-inst.xml @@ -4,9 +4,9 @@ Installation of Expect patch -Np1 -i ../expect-&expect-version;.patch -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 --with-tcl=/stage1/lib \ +./configure --prefix=/stage1 --with-tcl=/stage1/lib \     --with-x=no --disable-symbols --cache-file=/dev/null -make LDFLAGS="-s" +make make test make install diff --git a/chapter05/findutils-inst.xml b/chapter05/findutils-inst.xml index c7a0c8b79..44fdb894d 100644 --- a/chapter05/findutils-inst.xml +++ b/chapter05/findutils-inst.xml @@ -29,8 +29,8 @@ This patch adds this macro to the source code. Prepare Findutils to be compiled: -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install diff --git a/chapter05/gawk-inst.xml b/chapter05/gawk-inst.xml index d6b61b645..203aec063 100644 --- a/chapter05/gawk-inst.xml +++ b/chapter05/gawk-inst.xml @@ -5,12 +5,11 @@ Prepare Gawk to be compiled: -CFLAGS="-O2 -pipe" \ -    ./configure --prefix=/stage1 +./configure --prefix=/stage1 Continue with compiling the package: -make LDFLAGS="-s" +make And finish off installing the package: diff --git a/chapter05/gcc-pass1-inst.xml b/chapter05/gcc-pass1-inst.xml index 2cf5349ad..b290d05f2 100644 --- a/chapter05/gcc-pass1-inst.xml +++ b/chapter05/gcc-pass1-inst.xml @@ -23,8 +23,7 @@ cd ../gcc-build Prepare GCC to be compiled: -CFLAGS="-O2 -pipe" \ -    ../gcc-&gcc-version;/configure --prefix=/stage1 \ +../gcc-&gcc-version;/configure --prefix=/stage1 \     --with-local-prefix=/stage1 \     --disable-nls --enable-shared \     --enable-languages=c @@ -54,9 +53,7 @@ correctly. Continue with compiling the package: -make BOOT_LDFLAGS="-static -s" \ -    BOOT_CFLAGS="-O2 -pipe" \ -    STAGE1_CFLAGS="-pipe" bootstrap +make BOOT_LDFLAGS="-static" bootstrap The meaning of the make options are: diff --git a/chapter05/gcc-pass2-inst.xml b/chapter05/gcc-pass2-inst.xml index 2b06c1ccd..c2d1ab9ae 100644 --- a/chapter05/gcc-pass2-inst.xml +++ b/chapter05/gcc-pass2-inst.xml @@ -10,13 +10,12 @@ patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patchmkdir ../gcc-build cd ../gcc-build -CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \ -    ../gcc-&gcc-version;/configure --prefix=/stage1 \ +../gcc-&gcc-version;/configure --prefix=/stage1 \     --with-local-prefix=/stage1 \     --enable-clocale=gnu --enable-shared \     --enable-threads=posix --enable-__cxa_atexit \     --enable-languages=c,c++ -make LDFLAGS="-s" +make make -k check make install diff --git a/chapter05/gettext-inst.xml b/chapter05/gettext-inst.xml index 660a77486..334c45df4 100644 --- a/chapter05/gettext-inst.xml +++ b/chapter05/gettext-inst.xml @@ -3,8 +3,8 @@ Installation of Gettext -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 && -make LDFLAGS="-s" && +./configure --prefix=/stage1 && +make && make check make install diff --git a/chapter05/glibc-inst.xml b/chapter05/glibc-inst.xml index d24006e27..7be5e261f 100644 --- a/chapter05/glibc-inst.xml +++ b/chapter05/glibc-inst.xml @@ -25,8 +25,7 @@ cd ../glibc-build Next, prepare Glibc to be compiled: -CFLAGS="-O2 -pipe" \ -    ../glibc-&glibc-version;/configure --prefix=/stage1 \ +../glibc-&glibc-version;/configure --prefix=/stage1 \     --disable-profile --enable-add-ons \     --with-headers=/stage1/include \     --with-binutils=/stage1/bin \ diff --git a/chapter05/grep-inst.xml b/chapter05/grep-inst.xml index 5bb131fbd..b65737c1c 100644 --- a/chapter05/grep-inst.xml +++ b/chapter05/grep-inst.xml @@ -3,9 +3,9 @@ Installation of Grep -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \ +./configure --prefix=/stage1 \     --disable-perl-regexp --with-included-regex -make LDFLAGS="-s" +make make check make install diff --git a/chapter05/gzip-inst.xml b/chapter05/gzip-inst.xml index 9e92aeef6..bb549fe9d 100644 --- a/chapter05/gzip-inst.xml +++ b/chapter05/gzip-inst.xml @@ -3,8 +3,8 @@ Installation of Gzip -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install rm -f /stage1/bin/{gunzip,zcat} diff --git a/chapter05/make-inst.xml b/chapter05/make-inst.xml index e946786fe..2bd0be489 100644 --- a/chapter05/make-inst.xml +++ b/chapter05/make-inst.xml @@ -3,8 +3,8 @@ Installation of Make -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install diff --git a/chapter05/patch-inst.xml b/chapter05/patch-inst.xml index 2700e65e0..a10a41387 100644 --- a/chapter05/patch-inst.xml +++ b/chapter05/patch-inst.xml @@ -3,9 +3,8 @@ Installation of Patch -CPPFLAGS=-D_GNU_SOURCE CFLAGS="-O2 -pipe" \ -    ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make install diff --git a/chapter05/perl-inst.xml b/chapter05/perl-inst.xml index f44cdfde1..46b480df8 100644 --- a/chapter05/perl-inst.xml +++ b/chapter05/perl-inst.xml @@ -3,7 +3,7 @@ Installation of Perl patch -Np1 -i ../perl-&perl-version;-libc.patch -./configure.gnu --prefix=/stage1 -Doptimize='-O2 -pipe' && +./configure.gnu --prefix=/stage1 && make perl make utilities && cp perl /stage1/bin/perl && diff --git a/chapter05/sed-inst.xml b/chapter05/sed-inst.xml index b06d9d495..d17835336 100644 --- a/chapter05/sed-inst.xml +++ b/chapter05/sed-inst.xml @@ -3,8 +3,8 @@ Installation of Sed -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install diff --git a/chapter05/setting-environment.xml b/chapter05/setting-environment.xml index 636c05745..97fb25f3c 100644 --- a/chapter05/setting-environment.xml +++ b/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 diff --git a/chapter05/tar-inst.xml b/chapter05/tar-inst.xml index 3946e3d8f..0d7a5c5d0 100644 --- a/chapter05/tar-inst.xml +++ b/chapter05/tar-inst.xml @@ -12,8 +12,8 @@ used for gzip files. patch -Np1 -i ../tar-&tar-patch-version;.patch -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install diff --git a/chapter05/tcl-inst.xml b/chapter05/tcl-inst.xml index 6912a6604..523ce4463 100644 --- a/chapter05/tcl-inst.xml +++ b/chapter05/tcl-inst.xml @@ -4,8 +4,8 @@ Installation of TCL 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 diff --git a/chapter05/texinfo-inst.xml b/chapter05/texinfo-inst.xml index b1621fcd9..da13fa3c9 100644 --- a/chapter05/texinfo-inst.xml +++ b/chapter05/texinfo-inst.xml @@ -3,8 +3,8 @@ Installation of Texinfo -CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 -make LDFLAGS="-s" +./configure --prefix=/stage1 +make make check make install make TEXMF=/stage1/share/texmf install-tex diff --git a/chapter05/utillinux-inst.xml b/chapter05/utillinux-inst.xml index 6e3815a86..abab18f21 100644 --- a/chapter05/utillinux-inst.xml +++ b/chapter05/utillinux-inst.xml @@ -3,10 +3,10 @@ Installation of Util-linux -CFLAGS="-O2 -pipe" ./configure -make -C lib LDFLAGS="-s" -make -C mount LDFLAGS="-s" mount umount -make -C text-utils LDFLAGS="-s" more +./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 diff --git a/chapter06/binutils-inst.xml b/chapter06/binutils-inst.xml index 588caee4b..0c2d4f973 100644 --- a/chapter06/binutils-inst.xml +++ b/chapter06/binutils-inst.xml @@ -16,14 +16,13 @@ cd ../binutils-build Next, prepare Binutils to be compiled: -CFLAGS="-O2 -pipe" \ -    ../binutils-&binutils-version;/configure \ +../binutils-&binutils-version;/configure \     --prefix=/usr --mandir=/usr/share/man \     --infodir=/usr/share/info --enable-shared Continue with compiling the package: -make tooldir=/usr LDFLAGS="-s" +make tooldir=/usr make check diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml index 0aa8fd173..0d35d818c 100644 --- a/chapter06/gcc-inst.xml +++ b/chapter06/gcc-inst.xml @@ -26,8 +26,7 @@ cd ../gcc-build Prepare GCC to be compiled: -CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \ -    ../gcc-&gcc-version;/configure --prefix=/usr \ +../gcc-&gcc-version;/configure --prefix=/usr \     --enable-shared --enable-threads=posix \     --enable-__cxa_atexit --enable-clocale=gnu \     --mandir=/usr/share/man \ @@ -55,7 +54,7 @@ is implemented. Continue with compiling the package: -make LDFLAGS="-s" +make make -k check diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 78e384289..0edfa2b2e 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -11,8 +11,7 @@ cd ../glibc-build Next, prepare Glibc to be compiled: -CFLAGS="-O2 -pipe" \ -    ../glibc-&glibc-version;/configure --prefix=/usr \ +../glibc-&glibc-version;/configure --prefix=/usr \     --disable-profile --enable-add-ons \     --libexecdir=/usr/bin \     --with-headers=/usr/include \