diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index ca8e5b8f7..9c9f6225f 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -72,9 +72,10 @@ cd ../binutils-build Now prepare Binutils for compilation: -../binutils-&binutils-version;/configure \ - --target=$LFS_TGT --prefix=/tools \ - --disable-nls --disable-werror +../binutils-&binutils-version;/configure --target=$LFS_TGT \ + --prefix=/tools \ + --disable-nls \ + --disable-werror The meaning of the configure options: diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml index f3fe914bb..03e55ca1e 100644 --- a/chapter05/binutils-pass2.xml +++ b/chapter05/binutils-pass2.xml @@ -51,9 +51,12 @@ cd ../binutils-build Prepare Binutils for compilation: CC="$LFS_TGT-gcc -B/tools/lib/" \ - AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ - ../binutils-&binutils-version;/configure --prefix=/tools \ - --disable-nls --with-lib-path=/tools/lib +AR=$LFS_TGT-ar \ +RANLIB=$LFS_TGT-ranlib \ +../binutils-&binutils-version;/configure \ + --prefix=/tools \ + --disable-nls \ + --with-lib-path=/tools/lib The meaning of the new configure options: diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 31703a184..d3efd71d6 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -76,14 +76,23 @@ cd ../gcc-build Prepare GCC for compilation: -../gcc-&gcc-version;/configure \ - --target=$LFS_TGT --prefix=/tools \ - --disable-nls --disable-shared --disable-multilib \ - --disable-decimal-float --disable-threads \ - --disable-libmudflap --disable-libssp \ - --disable-libgomp --disable-libquadmath \ - --disable-target-libiberty --disable-target-zlib \ - --enable-languages=c --without-ppl --without-cloog \ +../gcc-&gcc-version;/configure \ + --target=$LFS_TGT \ + --prefix=/tools \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + --disable-decimal-float \ + --disable-threads \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-target-libiberty \ + --disable-target-zlib \ + --enable-languages=c \ + --without-ppl \ + --without-cloog \ --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ --with-mpfr-lib=$(pwd)/mpfr/src/.libs @@ -159,8 +168,7 @@ cd ../gcc-build since that file will end up containing the objects normally contained in libgcc_eh.a: -ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ - sed 's/libgcc/&_eh/'` +ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'` diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index 6823aea83..98243d88b 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -150,14 +150,22 @@ cd ../gcc-build Now prepare GCC for compilation: CC="$LFS_TGT-gcc -B/tools/lib/" \ - AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ - ../gcc-&gcc-version;/configure --prefix=/tools \ - --with-local-prefix=/tools --enable-clocale=gnu \ - --enable-shared --enable-threads=posix \ - --enable-__cxa_atexit --enable-languages=c,c++ \ - --disable-libstdcxx-pch --disable-multilib \ - --disable-bootstrap --disable-libgomp \ - --without-ppl --without-cloog \ +AR=$LFS_TGT-ar \ +RANLIB=$LFS_TGT-ranlib \ +../gcc-&gcc-version;/configure \ + --prefix=/tools \ + --with-local-prefix=/tools \ + --enable-clocale=gnu \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-languages=c,c++ \ + --disable-libstdcxx-pch \ + --disable-multilib \ + --disable-bootstrap \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ --with-mpfr-lib=$(pwd)/mpfr/src/.libs diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 8fcd0a8b4..26db57d2d 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -74,11 +74,16 @@ esac Next, prepare Glibc for compilation: -../glibc-&glibc-version;/configure --prefix=/tools \ - --host=$LFS_TGT --build=$(../glibc-&glibc-version;/scripts/config.guess) \ - --disable-profile --enable-add-ons \ - --enable-kernel=2.6.25 --with-headers=/tools/include \ - libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes +../glibc-&glibc-version;/configure \ + --prefix=/tools \ + --host=$LFS_TGT \ + --build=$(../glibc-&glibc-version;/scripts/config.guess) \ + --disable-profile \ + --enable-add-ons \ + --enable-kernel=2.6.25 \ + --with-headers=/tools/include \ + libc_cv_forced_unwind=yes \ + libc_cv_c_cleanup=yes The meaning of the configure options: diff --git a/chapter05/grep.xml b/chapter05/grep.xml index fcfec08f9..2cfe6127e 100644 --- a/chapter05/grep.xml +++ b/chapter05/grep.xml @@ -45,8 +45,7 @@ Prepare Grep for compilation: -./configure --prefix=/tools \ - --disable-perl-regexp +./configure --prefix=/tools --disable-perl-regexp The meaning of the configure switches: diff --git a/chapter06/bash.xml b/chapter06/bash.xml index 1e92190da..f6a5ca7a6 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -47,9 +47,11 @@ Prepare Bash for compilation: -./configure --prefix=/usr --bindir=/bin \ - --htmldir=/usr/share/doc/bash-&bash-version; --without-bash-malloc \ - --with-installed-readline +./configure --prefix=/usr \ + --bindir=/bin \ + --htmldir=/usr/share/doc/bash-&bash-version; \ + --without-bash-malloc \ + --with-installed-readline The meaning of the configure options: diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index 08f051e86..c90285c9a 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -16,7 +16,9 @@ realm that is, at the moment, populated with only the temporary tools: chroot "$LFS" /tools/bin/env -i \ - HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \ + HOME=/root \ + TERM="$TERM" \ + PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml index 8a0efa696..22b6ba24f 100644 --- a/chapter06/e2fsprogs.xml +++ b/chapter06/e2fsprogs.xml @@ -52,10 +52,15 @@ cd build Prepare E2fsprogs for compilation: -PKG_CONFIG=/tools/bin/true LDFLAGS="-lblkid -luuid" \ - ../configure --prefix=/usr --with-root-prefix="" \ - --enable-elf-shlibs --disable-libblkid --disable-libuuid \ - --disable-uuidd --disable-fsck +PKG_CONFIG=/tools/bin/true \ +LDFLAGS="-lblkid -luuid" \ +../configure --prefix=/usr \ + --with-root-prefix="" \ + --enable-elf-shlibs \ + --disable-libblkid \ + --disable-libuuid \ + --disable-uuidd \ + --disable-fsck The meaning of the configure options: @@ -139,16 +144,14 @@ cd build commands. gunzip -v /usr/share/info/libext2fs.info.gz -install-info --dir-file=/usr/share/info/dir \ - /usr/share/info/libext2fs.info +install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info If desired, create and install some additional documentation by issuing the following commands: makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo install -v -m644 doc/com_err.info /usr/share/info -install-info --dir-file=/usr/share/info/dir \ - /usr/share/info/com_err.info +install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml index d7d02cced..96f9a5133 100644 --- a/chapter06/findutils.xml +++ b/chapter06/findutils.xml @@ -45,8 +45,9 @@ Prepare Findutils for compilation: -./configure --prefix=/usr --libexecdir=/usr/lib/findutils \ - --localstatedir=/var/lib/locate +./configure --prefix=/usr \ + --libexecdir=/usr/lib/findutils \ + --localstatedir=/var/lib/locate The meaning of the configure options: diff --git a/chapter06/flex.xml b/chapter06/flex.xml index bb6484912..df31b7f39 100644 --- a/chapter06/flex.xml +++ b/chapter06/flex.xml @@ -88,8 +88,7 @@ chmod -v 755 /usr/bin/lex file: mkdir -v /usr/share/doc/flex-&flex-version; -cp -v doc/flex.pdf \ - /usr/share/doc/flex-&flex-version; +cp -v doc/flex.pdf /usr/share/doc/flex-&flex-version; diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index c52c84508..832def654 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -59,8 +59,7 @@ If desired, install the documentation: mkdir -v /usr/share/doc/gawk-&gawk-version; -cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} \ - /usr/share/doc/gawk-&gawk-version; +cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version; diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index 013d69c8c..834331a2c 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -54,8 +54,7 @@ consistent compiler builds: case `uname -m` in - i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' \ - gcc/Makefile.in ;; + i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; esac The fixincludes script is known to occasionally @@ -74,11 +73,16 @@ cd ../gcc-build Prepare GCC for compilation: -../gcc-&gcc-version;/configure --prefix=/usr \ - --libexecdir=/usr/lib --enable-shared \ - --enable-threads=posix --enable-__cxa_atexit \ - --enable-clocale=gnu --enable-languages=c,c++ \ - --disable-multilib --disable-bootstrap --with-system-zlib +../gcc-&gcc-version;/configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-clocale=gnu \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-bootstrap \ + --with-system-zlib Note that for other languages, there are some prerequisites that are not available. See the BLFS Book for instructions on how to diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 37ec19105..9ff6c5559 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -130,9 +130,12 @@ esac Prepare Glibc for compilation: -../glibc-&glibc-version;/configure --prefix=/usr \ - --disable-profile --enable-add-ons \ - --enable-kernel=2.6.25 --libexecdir=/usr/lib/glibc +../glibc-&glibc-version;/configure \ + --prefix=/usr \ + --disable-profile \ + --enable-add-ons \ + --enable-kernel=2.6.25 \ + --libexecdir=/usr/lib/glibc The meaning of the new configure options: diff --git a/chapter06/grub.xml b/chapter06/grub.xml index bf09ac522..33c4ce452 100644 --- a/chapter06/grub.xml +++ b/chapter06/grub.xml @@ -42,11 +42,11 @@ Prepare GRUB for compilation: -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --disable-grub-emu-usb \ - --disable-efiemu \ - --disable-werror +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --disable-grub-emu-usb \ + --disable-efiemu \ + --disable-werror The --disable switches minimize what is built by disabling features and testing programs not really needed for LFS. diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml index b6dd98c97..460fe98c7 100644 --- a/chapter06/inetutils.xml +++ b/chapter06/inetutils.xml @@ -40,9 +40,13 @@ Installation of Inetutils -./configure --prefix=/usr --libexecdir=/usr/sbin \ - --localstatedir=/var --disable-ifconfig \ - --disable-logger --disable-syslogd --disable-whois \ +./configure --prefix=/usr \ + --libexecdir=/usr/sbin \ + --localstatedir=/var \ + --disable-ifconfig \ + --disable-logger \ + --disable-syslogd \ + --disable-whois \ --disable-servers diff --git a/chapter06/iproute2.xml b/chapter06/iproute2.xml index 5a69518e9..169054a3b 100644 --- a/chapter06/iproute2.xml +++ b/chapter06/iproute2.xml @@ -87,7 +87,9 @@ rm man/man8/arpd.8 Install the package: -make DESTDIR= MANDIR=/usr/share/man \ + +make DESTDIR= \ + MANDIR=/usr/share/man \ DOCDIR=/usr/share/doc/iproute2-&iproute2-version; install diff --git a/chapter06/kmod.xml b/chapter06/kmod.xml index 736e0d129..649cb76d3 100644 --- a/chapter06/kmod.xml +++ b/chapter06/kmod.xml @@ -47,8 +47,12 @@ liblzma_LIBS="-L/lib -llzma" \ zlib_CFLAGS="-I/usr/include" \ zlib_LIBS="-L/lib -lz" \ -./configure --prefix=/usr --bindir=/bin --libdir=/lib --sysconfdir=/etc \ - --with-xz --with-zlib +./configure --prefix=/usr \ + --bindir=/bin \ + --libdir=/lib \ + --sysconfdir=/etc \ + --with-xz \ + --with-zlib The meaning of the configure options: @@ -77,9 +81,11 @@ zlib_LIBS="-L/lib -lz" \ make pkgconfigdir=/usr/lib/pkgconfig install + for target in depmod insmod modinfo modprobe rmmod; do ln -sv ../bin/kmod /sbin/$target done + ln -sv kmod /bin/lsmod diff --git a/chapter06/libpipeline.xml b/chapter06/libpipeline.xml index a2a573892..04bc472b4 100644 --- a/chapter06/libpipeline.xml +++ b/chapter06/libpipeline.xml @@ -43,8 +43,9 @@ Prepare Libpipeline for compilation: -./configure CHECK_CFLAGS=-I/tools/include \ - CHECK_LIBS="-L/tools/lib -lcheck" --prefix=/usr +./configure CHECK_CFLAGS=-I/tools/include \ + CHECK_LIBS="-L/tools/lib -lcheck" \ + --prefix=/usr The meaning of the configure options: diff --git a/chapter06/man-db.xml b/chapter06/man-db.xml index 833099bef..d5fa4f5bf 100644 --- a/chapter06/man-db.xml +++ b/chapter06/man-db.xml @@ -43,13 +43,17 @@ Prepare Man-DB for compilation: -PKG_CONFIG=/tools/bin/true \ - libpipeline_CFLAGS='' \ - libpipeline_LIBS='-lpipeline' \ - ./configure --prefix=/usr --libexecdir=/usr/lib \ - --docdir=/usr/share/doc/man-db-&man-db-version; --sysconfdir=/etc \ - --disable-setuid --with-browser=/usr/bin/lynx \ - --with-vgrind=/usr/bin/vgrind --with-grap=/usr/bin/grap +PKG_CONFIG=/tools/bin/true \ +libpipeline_CFLAGS='' \ +libpipeline_LIBS='-lpipeline' \ +./configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --docdir=/usr/share/doc/man-db-&man-db-version; \ + --sysconfdir=/etc \ + --disable-setuid \ + --with-browser=/usr/bin/lynx \ + --with-vgrind=/usr/bin/vgrind \ + --with-grap=/usr/bin/grap The meaning of the configure options: diff --git a/chapter06/mpfr.xml b/chapter06/mpfr.xml index fe183fb7d..b4a6cd28d 100644 --- a/chapter06/mpfr.xml +++ b/chapter06/mpfr.xml @@ -47,8 +47,9 @@ Prepare MPFR for compilation: -./configure --prefix=/usr --enable-thread-safe \ - --docdir=/usr/share/doc/mpfr-&mpfr-version; +./configure --prefix=/usr \ + --enable-thread-safe \ + --docdir=/usr/share/doc/mpfr-&mpfr-version; Compile the package: diff --git a/chapter06/perl.xml b/chapter06/perl.xml index 813405376..285c4ec98 100644 --- a/chapter06/perl.xml +++ b/chapter06/perl.xml @@ -66,7 +66,7 @@ this package is built. Alternatively, use the command exactly as below to use the defaults that Perl auto-detects: -sh Configure -des -Dprefix=/usr \ +sh Configure -des -Dprefix=/usr \ -Dvendorprefix=/usr \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml index b0c0cea89..4a2770489 100644 --- a/chapter06/psmisc.xml +++ b/chapter06/psmisc.xml @@ -58,7 +58,7 @@ Finally, move the killall and fuser programs to the location specified by the FHS: -mv -v /usr/bin/fuser /bin +mv -v /usr/bin/fuser /bin mv -v /usr/bin/killall /bin diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index 222850613..2acf8972d 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -52,8 +52,7 @@ Sending processes configured via /etc/inittab the TERM signal instead: -sed -i 's@Sending processes@& configured via /etc/inittab@g' \ - src/init.c +sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c Maintained versions of the wall and mountpoint programs were diff --git a/chapter06/tar.xml b/chapter06/tar.xml index 94044d6dd..842b17156 100644 --- a/chapter06/tar.xml +++ b/chapter06/tar.xml @@ -42,8 +42,10 @@ Prepare Tar for compilation: -FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr \ - --bindir=/bin --libexecdir=/usr/sbin +FORCE_UNSAFE_CONFIGURE=1 \ +./configure --prefix=/usr \ + --bindir=/bin \ + --libexecdir=/usr/sbin The meaning of the configure options: diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml index b728a237d..ba93f2825 100644 --- a/chapter06/util-linux.xml +++ b/chapter06/util-linux.xml @@ -49,8 +49,7 @@ hwclock program FHS-compliant, run the following: -sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ - -i $(grep -rl '/etc/adjtime' .) +sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' -i $(grep -rl '/etc/adjtime' .) mkdir -pv /var/lib/hwclock