Updated book is at: http://www.linuxfromscratch.org/~robert/new/Onward/ http://www.linuxfromscratch.org/~robert/new/Onward.tar.bz2
I don't want to make a mess with svn yet, but soon. Glibc refuses to install sbin's to /tools/sbin... Instead of using the LFS rolled up Bash fixes patch, I added a wget command in the patches page to mass download the patches from gnu.org, and a command in the Bash page to apply them all. This way it maintains itself as new patches are added to gnu.org. To get GCC building with read-only sources, throughout the book, the following commands work to set the dynamic loader name: sed -i.orig '/GLIBC_DYNAMIC_LINKER/{ s/^/#ifndef GLIBC_DYNAMIC_LINKER\ / s/$/\ #endif/ }' gcc/config/i386/linux.h && make configure-host && echo '#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2" #define STANDARD_INCLUDE_DIR 0' >> gcc/auto-host.h To link to /lib, just don't append to auto-host.h, and build GCC normally. I didn't add this to the book, yet, because it's a bit messy, and as long as Glibc's refuses to build with read-only sources it's pointless. Everything is building from an object directory. I made a new fpie patch which adds '--warn-shared-textrel --fatal-warnings'. The fatal error can be disabled with -Wl,--no-fatal-warnings. This has the side effect of making mktemp(3) and tmpnam(3) cause a build error, so the mkstemp patch for Patch is added to the temporary tools. It found DT_TEXTREL in e2fsprogs libraries too. tmpnam is used in Perl, but I can't find a way around it... maybe we can trick Perl's ./Configure into thinking our libc doesn't have tmpnam. Coreutils insists on using asprintf from gnulib, including ignoring --cache-file=config.cache, and its causing a million warnings, and not using asprintf from Glibc. I pulled my hair out trying to fix this, and it didn't help. The M4 package has the same problem. I dropped the -N from patch commands, using 'patch -p1 -i ../' instead. The -N option is "Ignore patches that seem to be reversed or already applied.", and that means something is wrong. It looks like ./Configure -Dlibc=/tools/lib/libc-2.8.so -Ulocincpth -Uloclibpth -Dglibpth="/tools/lib" -Dusrinc="/tools/include" is equivalent to the Perl libc patch. It's ugly, but I think it's correct and it's one less patch. I added --infodir=$(pwd)/DESTDIR --mandir=$(pwd)/DESTDIR to every package, so we don't install any docs to /tools. Miniperl doesn't install docs, so this actually works, except with Bzip2. libexec stuff is installed to /tools/lib, so we don't have a /tools/libexec. robert
pgpXzphr1ulCX.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/hlfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page