*************************************************************** *************************************************************** # # # build tool-chain mit GNU LibC 2.3.6 # # gcc, gc++, gcj, gcobjc -> 4.2.4 # # 2012-10-08 # svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch # ergibt dann einen 4.2.5 # 'gcc (GCC) 4.2.5 20090330 (prerelease)' # angefangen mit gcc-4.1.3 exit 1 # http://www.linuxfromscratch.org/lfs/view/6.6/index.html # http://www.linuxfromscratch.org/lfs/view/7.1/ # http://www.linuxfromscratch.org/patches/downloads/ # http://oss.erdfunkstelle.de/lfs-de/6.4/online/chapter05/gcc-pass1.html Basis LFS 6.4 als User holbru zum Hostsystem hinzugefuegt su - holbru gmp-5.0.5 tar xf gmp-5.0.5.tar.xz && mkdir build-1 && cd build-1 2. Konsole export CFLAGS='-O2 -march=i486' export CXXFLAGS="${CFLAGS}" ../gmp-5.0.5/configure \ --prefix=/usr \ --enable-cxx \ --enable-mpbsd \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check su - root make install mpfr-3.1.1 tar xf mpfr-3.1.1.tar.xz && mkdir build-1 && cd build-1 ../mpfr-3.1.1/configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu #--enable-thread-safe make make check su - root make install ------------------------------- weiter mit User lfs su - lfs # binutils 2.19.1 tar xf binutils-2.19.1.tar.bz2 && mkdir -v binutils-build && cd binutils-build CC="gcc -B/usr/bin/" ../binutils-2.19.1/configure \ --prefix=/tools \ --disable-nls \ --disable-werror \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install make -C ld clean make -C ld LIB_PATH=/tools/lib cp -v ld/ld-new /tools/bin # gcc-4_2-branch -> 4.2.5 # Es ist besser c++ mit zubauen, dadurch lassen sich # gmp und mpfr ausserhalb vom gcc im 2. Durchgang bauen, # c++ dafuer erforderlich ist. Dauert wesentlich laenger. tar xf gcc-4_2-branch.tar.bz2 mkdir -v gcc-build && cd gcc-build CC="gcc -B/usr/bin/" ../gcc-4_2-branch/configure \ --prefix=/tools \ --with-local-prefix=/tools \ --disable-nls \ --disable-shared \ --disable-libssp \ --enable-languages=c \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install ln -vs libgcc.a `gcc -print-libgcc-file-name | \ sed 's/libgcc/&_eh/'` ln -vs gcc /tools/bin/cc # Installation von Linux-API-Header 2.6.32-eisfair-1 su - holbru make mrproper make headers_check make INSTALL_HDR_PATH=dest headers_install su - lfs cp -rv dest/include/* /tools/include # glibc-2.8 tar xf glibc-2.8.tar.bz2 cd glibc-2.8 tar xf ../glibc-libidn-2.8.tar.gz mv glibc-libidn-2.8 libidn sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c mkdir -v ../glibc-build && cd ../glibc-build echo "CFLAGS += -march=i486 -mtune=native" > configparms ../glibc-2.8/configure \ --prefix=/tools \ --disable-profile \ --enable-add-ons \ --enable-kernel=2.6.0 \ --with-binutils=/tools/bin \ --without-gd \ --with-headers=/tools/include \ --without-selinux \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu configure: running configure fragment for add-on libidn configure: running configure fragment for add-on nptl make make[2]: Leaving directory `/data/source/glibc-2.8/wctype' make subdir=manual -C manual ..=../ subdir_lib make[2]: Entering directory `/data/source/glibc-2.8/manual' Makefile:235: *** mixed implicit and normal rules. Stop. make[2]: Leaving directory `/data/source/glibc-2.8/manual' make[1]: *** [manual/subdir_lib] Error 2 make[1]: Leaving directory `/data/source/glibc-2.8' siehe: http://www.linuxquestions.org/questions/linux-from-scratch-13/glibc-not-compiling-in-chapter-6-9-a-824573/ sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile mkdir -v /tools/etc touch /tools/etc/ld.so.conf make install # Anpasssen der toolchain mv -v /tools/bin/{ld,ld-old} mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old} mv -v /tools/bin/{ld-new,ld} ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' \ > `dirname $(gcc -print-libgcc-file-name)`/specs GCC_FIXED=`dirname $(gcc -print-libgcc-file-name)`/include-fixed && find ${GCC_FIXED}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_FIXED}/*` && unset GCC_FIXED echo 'main(){}' > dummy.c cc dummy.c readelf -l a.out | grep ': /tools' [Requesting program interpreter: /tools/lib/ld-linux.so.2] rm -v dummy.c a.out # Tcl 8.5.12 cd unix ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install chmod -v u+w /tools/lib/libtcl8.5.so make install-private-headers ln -sv tclsh8.5 /tools/bin/tclsh # Expect 3.45 cp -v configure{,.orig} sed 's:/usr/local/bin:/bin:' configure.orig > configure ./configure \ --prefix=/tools \ --with-tcl=/tools/lib \ --with-tclinclude=/tools/include \ --with-x=no \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make SCRIPTS="" install # Dejagnu 1.5 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install ####### # 2. Durchlauf # gcc 4_2-branch cp -v gcc/Makefile.in{,.orig} sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in cp -v gcc/Makefile.in{,.tmp} sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \ > gcc/Makefile.in for file in $(find gcc/config -name linux64.h -o -name linux.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ -e 's@/usr@/tools@g' $file.orig > $file echo " #undef STANDARD_INCLUDE_DIR #define STANDARD_INCLUDE_DIR 0" >> $file touch $file.orig done tar -jxf ../mpfr-3.1.1.tar.xz mv mpfr-3.1.1 mpfr tar -jxf ../gmp-5.0.5.tar.xz mv gmp-5.0.5 gmp mkdir -v gcc-build cd gcc-build ../gcc-4_2-branch/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-bootstrap \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu echo 'main(){}' > dummy.c cc dummy.c readelf -l a.out | grep ': /tools' rm -v dummy.c a.out # Binutils 2.19.1 mkdir -v binutils-build && cd binutils-build ../binutils-2.19.1/configure \ --prefix=/tools \ --disable-nls \ --with-lib-path=/tools/lib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install make -C ld clean make -C ld LIB_PATH=/usr/lib:/lib cp -v ld/ld-new /tools/bin # Ncurses 5.9 \./configure \ --prefix=/tools \ --with-shared \ --without-debug \ --without-ada \ --enable-overwrite \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Bash 4.0.2 patch -Np1 -i ../bash-4.0.2-fixes-6.patch ./configure \ --prefix=/tools \ --without-bash-malloc \ ac_cv_func_working_mktime=yes \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install ln -vs bash /tools/bin/sh # Bzip 1.0.6 make make PREFIX=/tools install # Coreutils 8.5 ./configure \ --prefix=/tools \ --enable-install-program=hostname \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install cp -v src/su /tools/bin/su-tools # Diffutils 2.9 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # e2fsprogs 1.42.5 mkdir -v build && cd build ../configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install make install-libs chmod -v u+w /tools/lib/{libblkid,libcom_err,libe2p,libext2fs,libss,libuuid}.a # Findutils 4.4.2 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Gawk 3.1.8 ./configure \ --prefix=/tools \ ac_cv_func_working_mktime=yes \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Gettext cd gettext-tools ./configure \ --prefix=/tools \ --disable-shared \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make -C gnulib-lib make -C src msgfmt cp -v src/msgfmt /tools/bin # grep 2.14 ./configure \ --prefix=/tools \ --disable-perl-regexp \ --without-included-regex \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Gzip 1.3.10 for file in gzip.c lib/utimens.{c,h} ; do \ cp -v $file{,.orig} sed 's/futimens/gl_&/' $file.orig > $file done ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # M4 1.4.16 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Make 3.82 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Patch 2.6.1 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Perl 5.10 , konnte 5.12 nicht finden patch -Np1 -i ../perl-5.10.0-consolidated-1.patch sh Configure -des -Dprefix=/tools \ -Dstatic_ext='Data/Dumper Fcntl IO POSIX' make perl utilities ext/Errno/pm_to_blib cp -v perl pod/pod2man /tools/bin mkdir -pv /tools/lib/perl5/5.10.0 cp -Rv lib/* /tools/lib/perl5/5.10.0 # Sed 4.2.1 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Tar 1.26 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Texinfo 4.13a ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make install # Util-linux 2.19.1 ./configure \ --prefix=/tools \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make BLKID_LIBS="-lblkid -luuid" -C mount mount umount make -C text-utils more cp -v mount/{,u}mount text-utils/more /tools/bin # Basissystem aufbauen mkdir -pv $LFS/{dev,proc,sys} mknod -m 600 $LFS/dev/console c 5 1 mknod -m 666 $LFS/dev/null c 1 3 # Platten einhaengen mount -v --bind /dev $LFS/dev mount -vt devpts devpts $LFS/dev/pts mount -vt tmpfs shm $LFS/dev/shm mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys # Chrooten chroot "$LFS" /tools/bin/env -i \ HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h # Ordnerstruktur erstellen mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt} mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} install -dv -m 0750 /root install -dv -m 1777 /tmp /var/tmp mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} mkdir -pv /usr/{,local/}share/{doc,info,locale,man} mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo} mkdir -pv /usr/{,local/}share/man/man{1..8} for dir in /usr /usr/local; do ln -sv share/{man,doc,info} $dir done mkdir -v /var/{lock,log,mail,run,spool} mkdir -pv /var/{opt,cache,lib/{misc,locate},local} # Dateien erstellen ln -sv /tools/bin/{bash,cat,echo,grep,pwd,stty} /bin ln -sv /tools/bin/perl /usr/bin ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib ln -sv bash /bin/sh touch /etc/mtab cat > /etc/passwd << "EOF" root:x:0:0:root:/root:/bin/bash nobody:x:99:99:Unprivileged User:/dev/null:/bin/false EOF cat > /etc/group << "EOF" root:x:0: bin:x:1: sys:x:2: kmem:x:3: tty:x:4: tape:x:5: daemon:x:6: floppy:x:7: disk:x:8: lp:x:9: uucp:x:10: audio:x:11: video:x:12: utmp:x:13: usb:x:14: cdrom:x:15: mail:x:34: nogroup:x:99: EOF exec /tools/bin/bash --login +h touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} chgrp -v utmp /var/run/utmp /var/log/lastlog chmod -v 664 /var/run/utmp /var/log/lastlog # loss gehts ;-) # Linux Header 2.6.32 # eiskernel: 2.0.26 (2.6.32-eisfair-1-SMP) su - holbru make mrproper make headers_check make INSTALL_HDR_PATH=dest headers_install find dest/include \( -name .install -o -name ..install.cmd \) -delete # chroot cp -rv /source/dest/include/* /usr/include # Man-pages 3.42 # weill es in lfs steht ;-) xz fehlt in der chroot ausserhalb unxz cd /data/source/ unxz man-pages-3.42.tar.xz weiter in der chroot tar xf man-pages-3.42.tar make install # glibc 2.8 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED patch -Np1 -i ../glibc-2.8-20080929-iconv_tests-1.patch patch -Np1 -i ../glibc-2.8-20080929-ildoubl_test-1.patch sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile tar xf ../glibc-libidn-2.8.tar.gz mv glibc-libidn-2.8 libidn mkdir -v ../glibc-build && cd ../glibc-build echo "CFLAGS += -march=i486 -mtune=native" > configparms ../glibc-2.8/configure \ --prefix=/usr \ --disable-profile \ --enable-add-ons \ --enable-kernel=2.6.0 \ --libexecdir=/usr/lib/glibc \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make cp -v ../glibc-2.8/iconvdata/gconv-modules iconvdata make -k check 2>&1 | tee glibc-check-log grep Error glibc-check-log root:/source/glibc-build# grep Error glibc-check-log make[2]: *** [/source/glibc-build/math/test-double.out] Error 1 make[1]: *** [math/tests] Error 2 make[2]: [/source/glibc-build/posix/annexc.out] Error 1 (ignored) make[2]: *** [/source/glibc-build/rt/tst-cpuclock2.out] Error 1 make[1]: *** [rt/tests] Error 2 make: *** [check] Error 2 root:/source/glibc-build# touch /etc/ld.so.conf make install # localedata/SUPPORTED bereinigt make localedata/install-locales ###################### # libc extrahieren make install_root=/public/glibc-2.8-stripped install make install_root=/public/glibc-2.8-stripped localedata/install-locales # kernel header hinzufuegen cp -rv /source/dest/include/* /public/glibc-2.8-stripped/usr/include for filename in `find /public/glibc-2.8-stripped -type f` do echo "stripping $filename with -S" strip -S "$filename" done ###################### cat > /etc/nsswitch.conf << "EOF" # Begin /etc/nsswitch.conf passwd: files group: files shadow: files hosts: files dns networks: files protocols: files services: files ethers: files rpc: files # End /etc/nsswitch.conf EOF tzselect cp -v --remove-destination /usr/share/zoneinfo/Europe/Berlin \ /etc/localtime cat > /etc/ld.so.conf << "EOF" # Begin /etc/ld.so.conf /usr/local/lib /opt/lib # End /etc/ld.so.conf EOF mv -v /tools/bin/{ld,ld-old} mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old} mv -v /tools/bin/{ld-new,ld} ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld gcc -dumpspecs | sed \ -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \ `dirname $(gcc --print-libgcc-file-name)`/specs echo 'main(){}' > dummy.c cc dummy.c -v -Wl,--verbose &> dummy.log readelf -l a.out | grep ': /lib' [Requesting program interpreter: /lib/ld-linux.so.2] grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log /usr/lib/crt1.o succeeded /usr/lib/crti.o succeeded /usr/lib/crtn.o succeeded grep -B1 '^ /usr/include' dummy.log #include <...> search starts here: /usr/include grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' SEARCH_DIR("/tools/i486-pc-linux-gnu/lib") SEARCH_DIR("/usr/lib") SEARCH_DIR("/lib"); grep "/lib/libc.so.6 " dummy.log attempt to open /lib/libc.so.6 succeeded grep found dummy.log found ld-linux.so.2 at /lib/ld-linux.so.2 rm -v dummy.c a.out dummy.log ######################################################## Weiter mit der Toolchain # xz-utils 5.0.4 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check make install # bzip2 make -f Makefile-libbz2_so make install PREFIX=/usr # zlib 1.2.7 ./configure \ --prefix=/usr make make check make install # Binutils 2.19.1 rm -fv etc/standards.info sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in mkdir -v ../binutils-build && cd ../binutils-build ../binutils-2.19.1/configure \ --prefix=/usr \ --enable-shared \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make tooldir=/usr make -k check 2>&1 | tee binutils-check-log grep Error binutils-check-log === binutils Summary === # of expected passes 53 === gas Summary === # of expected passes 247 === ld Summary === # of expected passes 496 # of expected failures 4 PASS: test-expandargv-0. PASS: test-expandargv-1. PASS: test-expandargv-2. PASS: test-expandargv-3. make tooldir=/usr install cp -v ../binutils-2.19.1/include/libiberty.h /usr/include ############ make tooldir=/usr DESTDIR=/public/toolchain/binutils/ install cp -v ../binutils-2.19.1/include/libiberty.h /public/toolchain/binutils/usr/include/ for filename in `find /public/toolchain/binutils/usr/{bin/*,lib/*.so} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############# # gmp 5.0.5 ./configure \ --prefix=/usr \ --enable-cxx \ --enable-mpbsd \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check 2>&1 | tee gmp-check-log awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log 166 make install # mpfr 3.1.1 ./configure \ --prefix=/usr \ --enable-thread-safe \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check ==================== All 160 tests passed (1 test was not run) ==================== make install # bison 2.6.2 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu echo '#define YYENABLE_NLS 1' >> lib/config.h make make check make install # flex patch -Np1 -i ../flex-2.5.37-bison-2.6.1-1.patch ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check Tests succeeded: 46 Tests FAILED: 0 make install cat > /usr/bin/lex << "EOF" #!/bin/sh # Begin /usr/bin/lex exec /usr/bin/flex -l "$@" # End /usr/bin/lex EOF chmod -v 755 /usr/bin/lex ln -sv libfl.a /usr/lib/libl.a # gcc 4_2 branch sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in # ich weiss nicht was fuer 4_2 richtig ist, # setzte mal beide Versionen sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in cd .. && mkdir gcc-build && cd gcc-build ../gcc-4_2-branch/configure \ --prefix=/usr \ --libexecdir=/usr/lib \ --enable-clocale=gnu \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-languages=c,c++ \ --disable-libstdcxx-pch \ --disable-multilib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libssp \ --disable-bootstrap make make -k check 2>&1 | tee gcc-check # dauert ca. 2 Std Test Run By root on Sat Oct 13 18:58:29 2012 Native configuration is i486-pc-linux-gnu ../gcc-4_2-branch/contrib/test_summary | grep -A7 Summ. === gcc Summary === # of expected passes 42644 # of unexpected successes 1 # of expected failures 115 # of unresolved testcases 1 # of untested testcases 28 # of unsupported tests 295 === g++ Summary === # of expected passes 13671 # of expected failures 67 # of unsupported tests 74 === libstdc++ Summary === # of expected passes 3853 # of expected failures 15 # of unsupported tests 316 === libmudflap Summary === # of expected passes 1814 === libgomp Summary === # of expected passes 496 make install ln -sv ../usr/bin/cpp /lib ln -sv gcc /usr/bin/cc echo 'main(){}' > dummy.c cc dummy.c -v -Wl,--verbose &> dummy.log readelf -l a.out | grep ': /lib' [Requesting program interpreter: /lib/ld-linux.so.2] grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log /usr/lib/gcc/i486-pc-linux-gnu/4.2.5/../../../crt1.o succeeded /usr/lib/gcc/i486-pc-linux-gnu/4.2.5/../../../crti.o succeeded /usr/lib/gcc/i486-pc-linux-gnu/4.2.5/../../../crtn.o succeeded grep -B4 '^ /usr/include' dummy.log #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/gcc/i486-pc-linux-gnu/4.2.5/include /usr/include grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' SEARCH_DIR("/usr/i486-pc-linux-gnu/lib") SEARCH_DIR("/usr/local/lib") SEARCH_DIR("/lib") SEARCH_DIR("/usr/lib"); grep "/lib/libc.so.6 " dummy.log attempt to open /lib/libc.so.6 succeeded grep found dummy.log found ld-linux.so.2 at /lib/ld-linux.so.2 rm -v dummy.c a.out dummy.log cp /usr/lib/libgcc_s.so.1 /lib cd /usr/lib/ && ln -sf ../../lib/libgcc_s.so.1 libgcc_s.so ############################# make DESTDIR=/public/toolchain/gcc install for filename in `find /public/toolchain/gcc/usr/{bin/*,lib/*.so*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # zip 3.0 make -f unix/Makefile generic make -f unix/Makefile prefix=/usr install # gcj cd .. && mkdir gcj-build && cd gcj-build ../gcc-4_2-branch/configure \ --prefix=/usr \ --libexecdir=/usr/lib \ --enable-clocale=gnu \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-languages=c,c++,java \ --disable-libstdcxx-pch \ --disable-multilib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libssp \ --disable-bootstrap make make -k check 2>&1 | tee gcj-check ../gcc-4_2-branch/contrib/test_summary | grep -A7 Summ. Test Run By root on Sat Oct 20 08:40:58 2012 Native configuration is i486-pc-linux-gnu === gcc Summary === # of expected passes 42644 # of unexpected successes 1 # of expected failures 115 # of unresolved testcases 1 # of untested testcases 28 # of unsupported tests 295 Test Run By root on Sat Oct 20 09:17:04 2012 === g++ Summary === # of expected passes 13671 # of expected failures 67 # of unsupported tests 74 Test Run By root on Sat Oct 20 09:28:38 2012 === libstdc++ Summary === # of expected passes 3853 # of expected failures 15 # of unsupported tests 316 === libmudflap Summary === # of expected passes 1814 === libffi Summary === # of expected passes 1084 # of unsupported tests 8 Test Run By root on Sat Oct 20 10:15:30 2012 === libjava Summary === # of expected passes 7006 # of expected failures 12 # of untested testcases 8 === libgomp Summary === # of expected passes 496 ############################# make DESTDIR=/public/toolchain/gcj install for filename in `find /public/toolchain/gcj/usr/{bin/*,lib/*.so*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # objc cd .. && mkdir objc-build && cd objc-build ../gcc-4_2-branch/configure \ --prefix=/usr \ --libexecdir=/usr/lib \ --enable-clocale=gnu \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-languages=c,objc \ --disable-libstdcxx-pch \ --disable-multilib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libssp \ --disable-bootstrap make make -k check 2>&1 | tee gcobjc-check ../gcc-4_2-branch/contrib/test_summary | grep -A7 Summ. Test Run By root on Sun Oct 14 12:54:58 2012 Native configuration is i486-pc-linux-gnu === gcc Summary === # of expected passes 42644 # of unexpected successes 1 # of expected failures 115 # of unresolved testcases 1 # of untested testcases 28 # of unsupported tests 295 === g++ Summary === # of expected passes 13671 # of expected failures 67 # of unsupported tests 74 === objc Summary === # of expected passes 1806 # of expected failures 7 # of unsupported tests 24 === libstdc++ Summary === # of expected passes 3853 # of expected failures 15 # of unsupported tests 316 === libmudflap Summary === # of expected passes 1814 === libgomp Summary === # of expected passes 496 ############################# make DESTDIR=/public/toolchain/objc install for filename in `find /public/toolchain/objc/usr/{bin/*,lib/*.so*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # gcc-all fuer die shared libs mkdir gcall-build && cd gcall-build ../gcc-4_2-branch/configure \ --prefix=/usr \ --libexecdir=/usr/lib \ --enable-clocale=gnu \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-languages=c,c++,java,objc \ --disable-libstdcxx-pch \ --disable-multilib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libssp \ --disable-bootstrap make make -k check 2>&1 | tee gcall-check # dauert 2 1/2 Std. === gcc Summary === # of expected passes 42644 # of unexpected successes 1 # of expected failures 115 # of unresolved testcases 1 # of untested testcases 28 # of unsupported tests 295 === g++ Summary === # of expected passes 13671 # of expected failures 67 # of unsupported tests 74 === objc Summary === # of expected passes 1806 # of expected failures 7 # of unsupported tests 24 === libstdc++ Summary === # of expected passes 3853 # of expected failures 15 # of unsupported tests 316 === libmudflap Summary === # of expected passes 1814 === libjava Summary === # of expected passes 7006 # of expected failures 12 # of untested testcases 8 === libffi Summary === # of expected passes 1084 # of unsupported tests 8 === libgomp Summary === # of expected passes 496 ############################# make DESTDIR=/public/toolchain/gcall install for filename in `find /public/toolchain/gcall/usr/{bin/*,lib/*.so*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## export CFLAGS='-O2 -march=i486' export CXXFLAGS="${CFLAGS}" # zlib 1.2.7 ./configure \ --prefix=/usr make make check make install ################## make DESTDIR=/public/lib/z install # strip files/binarys for filename in `find /public/lib/z/usr/lib/*.so.* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############### # sed 4.2.1 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check ====================================================== All 65 tests behaved as expected (4 expected failures) ====================================================== make install cd /bin ln -sf ../usr/bin/sed ################## make DESTDIR=/public/utils/sed install for filename in `find /public/utils/sed/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # bzip2-1.0.6 sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile make -f Makefile-libbz2_so make clean make make PREFIX=/usr install ################## make install PREFIX=/public/utils/bzip2/usr # strip files/binarys for filename in `find /public/utils/bzip2/usr/{bin/*,lib/*.so.*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ################## # xz-utils-5.0.4 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check ================== All 9 tests passed ================== make install ################## make DESTDIR=/public/utils/xz_utils install # strip files/binarys for filename in `find /public/utils/xz_utils/usr/{bin/*,lib/*.so.*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ################## # gzip 1.5 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # TOTAL: 12 # PASS: 11 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 /source/gzip-1.5/zless: line 56: less: command not found + echo FAIL: zless FAIL: zless make install cd /bin ln -sfv ../usr/bin/gzip ################## make DESTDIR=/public/utils/gzip install # strip files/binarys for filename in `find /public/utils/gzip/usr/{bin/*,lib/*.so.*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ################## # grep 2.14 bunzip2 -dc ../grep-2.14.de.po.bz2 >po/de.po ./configure \ --prefix=/usr \ --localedir=/usr/share/locale \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --disable-perl-regexp make make -C po update-po make check # TOTAL: 140 # PASS: 122 # SKIP: 18 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 make install cd /bin ln -sfv ../usr/bin/{grep,egrep,fgrep} . ################## make DESTDIR=/public/utils/grep install for filename in `find /public/utils/grep/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ################## # ncurses 5.9 ./configure --prefix=/usr \ --with-shared \ --without-debug \ --enable-widec \ --enable-termcap \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu ** Configuration summary for NCURSES 5.9 20110404: extended funcs: yes xterm terminfo: xterm-new bin directory: /usr/bin lib directory: /usr/lib include directory: /usr/include man directory: /usr/man terminfo directory: /usr/share/terminfo make make install mv -v /usr/lib/libncursesw.so.5* /lib ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so for lib in ncurses form panel menu ; do \ rm -vf /usr/lib/lib${lib}.so ; \ echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \ ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \ done ln -sfv libncurses++w.a /usr/lib/libncurses++.a rm -vf /usr/lib/libcursesw.so rm -vf /usr/lib/libcursesw.so echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so ln -sfv libncurses.so /usr/lib/libcurses.so ln -sfv libncursesw.a /usr/lib/libcursesw.a ln -sfv libncurses.a /usr/lib/libcurses.a ################## make DESTDIR=/public/utils/ncurses install cd /public/utils/ncurses mv -v usr/lib/libncursesw.so.5* lib ln -sfv ../../lib/libncursesw.so.5 usr/lib/libncursesw.so for lib in ncurses form panel menu ; do \ rm -vf usr/lib/lib${lib}.so ; \ echo "INPUT(-l${lib}w)" >usr/lib/lib${lib}.so ; \ ln -sfv lib${lib}w.a usr/lib/lib${lib}.a ; \ done ln -sfv libncurses++w.a usr/lib/libncurses++.a rm -vf usr/lib/libcursesw.so echo "INPUT(-lncursesw)" >usr/lib/libcursesw.so ln -sfv libncurses.so usr/lib/libcurses.so ln -sfv libncursesw.a usr/lib/libcursesw.a ln -sfv libncurses.a usr/lib/libcurses.a ################## fuer die alte ncurses lib make distclean ./configure --prefix=/usr \ --with-shared \ --without-normal \ --without-debug \ --without-cxx-binding \ --enable-termcap \ --without-xterm-new \ --enable-static \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make sources libs cp -av lib/lib*.so.5* /usr/lib ################# cp -av lib/lib*.so.5* /public/utils/ncurses/usr/lib ################# ################# for filename in `find /public/utils/ncurses/{lib/*,usr/{bin/*,lib/*.so.*}} -type f` do echo $filename strip -R .note -R .comment "$filename" done ################# # m4-1.4.16 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make sed -i -e '41s/ENOENT/& || errno == EINVAL/' tests/test-readlink.h make check ======================= All 115 tests passed (15 tests were not run) ======================= make install ################## make DESTDIR=/public/toolchain/m4 install for filename in `find /public/toolchain/m4/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # bison-2.6.2 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu echo '#define YYENABLE_NLS 1' >> lib/config.h make make check # 307 tests were successful. # 18 tests were skipped. make install ################## make DESTDIR=/public/toolchain/bison install for filename in `find /public/toolchain/bison/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # readline 6.2 # ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001 # ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-002 # ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003 # ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-004 patch -Np0 -i ../ ./configure --prefix=/usr \ --libdir=/lib \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make SHLIB_LIBS=-lncurses make install mv -v /lib/lib{readline,history}.a /usr/lib rm -v /lib/lib{readline,history}.so ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so ###################### make DESTDIR=/public/lib/readline install cd /public/lib/readline mv -v lib/lib{readline,history}.a usr/lib rm -v lib/lib{readline,history}.so ln -sfv ../../lib/libreadline.so.6 usr/lib/libreadline.so ln -sfv ../../lib/libhistory.so.6 usr/lib/libhistory.so # strip files/binarys for filename in `find /public/lib/readline/lib/*.so.* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # bash 4.2 # http://www.linuxfromscratch.org/patches/downloads/bash/bash-4.2-fixes-9.patch patch -Np1 -i ../ ./configure --prefix=/usr \ --bindir=/bin \ --without-bash-malloc \ --with-installed-readline \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make chown -Rv nobody . su-tools nobody -s /bin/bash -c "make tests" make install exec /bin/bash --login +h #################################### make DESTDIR=/public/utils/bash install # strip files/binarys for filename in `find /public/utils/bash/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############### von Pack-Eis libgdbm{,-dev} libdb4{,-dev} perl{,dev} ############## # libtool-2.4.2 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # dauert etwas 102 tests behaved as expected. 24 tests were skipped. make install ########################### make DESTDIR=/public/lib/ltdl install for filename in `find /public/lib/ltdl/usr/{bin/*,lib/*.so.*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # autoconf-2.69 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # dauert etwas lange 457 tests behaved as expected. 46 tests were skipped. make install ################## make DESTDIR=/public/toolchain/autoconf install for filename in `find /public/toolchain/autoconf/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # automake-1.12.4 # korrekt /etc/localtime /usr/sbin/zic -l CET # lokalzone setzen TZ='Europe/Berlin'; export TZ ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # dauert etwas lange ca. 2 Std. # TOTAL: 2826 # PASS: 2639 # SKIP: 149 # XFAIL: 38 # FAIL: 0 # XPASS: 0 # ERROR: 0 make install ################## make DESTDIR=/public/toolchain/automake install for filename in `find /public/toolchain/autoconf/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################### # gawk 4.0.1 ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --libexecdir=/usr/lib make make check make install ########################################## make DESTDIR=/public/utils/gawk install # strip files/binarys for filename in `find /public/utils/gawk/usr/{bin,lib/awk}/* -type f` do echo $filename strip -R .note -R .comment "$filename" done #################################### # flex-2.5.37 patch -Np1 -i ../flex-2.5.37-bison-2.6.1-1.patch ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu checking for indent... indent configure: WARNING: no indent program found: make indent target will not function # spaeter neu machen wenn texinfo vorhanden ist ;-) make make check # Tests succeeded: 46 # Tests FAILED: 0 make install ln -sfv libfl.a /usr/lib/libl.a cat > /usr/bin/lex << "EOF" #!/bin/sh # Begin /usr/bin/lex exec /usr/bin/flex -l "$@" # End /usr/bin/lex EOF chmod -v 755 /usr/bin/lex ################### make DESTDIR=/public/toolchain/flex install cd /public/toolchain/flex/ ln -sfv libfl.a usr/lib/libl.a cat > usr/bin/lex << "EOF" #!/bin/sh # Begin /usr/bin/lex exec /usr/bin/flex -l "$@" # End /usr/bin/lex EOF chmod -v 755 usr/bin/lex for filename in `find /public/toolchain/flex/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ##################### # gettext-0.18.1.1 ./configure --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --prefix=/usr \ --disable-csharp \ --enable-shared \ --enable-static configure: WARNING: libacl development library was not found or not usable. configure: WARNING: gettext-tools will be built without ACL support. # spaeter neu machen, wenn acl vorhanden ist ;-) make make check ====================== All 115 tests passed (8 tests were not run) ====================== make install ######################## make DESTDIR=/public/lib/gettext install # strip files/binarys for filename in `find /public/lib/gettext/usr/{bin/*,lib/{*.so*,gettext/*}} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################# # Make-3.82 http://www.linuxfromscratch.org/patches/downloads/make/make-3.82-upstream_fixes-3.patch ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check as root :-( su - root make check # 437 Tests in 106 Categories Complete ... No Failures :-) make install ################################ make DESTDIR=/public/toolchain/make install for filename in `find /public/toolchain/make/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # patch 2.6.1 http://www.linuxfromscratch.org/patches/downloads/patch/patch-2.6.1-test_fix-1.patch ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # All tests succeeded! make install ################################# make DESTDIR=/public/toolchain/patch install for filename in `find /public/toolchain/patch/usr/bin/* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # tar 1.2.6 FORCE_UNSAFE_CONFIGURE=1 \ ./configure --prefix=/usr \ --libexecdir=/usr/sbin \ --datadir=/usr/share \ --enable-backup-scripts \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check 107 tests were successful. 14 tests were skipped. make install ln -sfv ../usr/bin/tar /bin/tar ###################### make DESTDIR=/public/utils/tar install ln -sfv ../usr/bin/tar bin/tar # strip files/binarys for filename in `find /public/utils/tar/usr/{bin/*,sbin/*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ########################## Texinfo-4.13a ./configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check # pass make install make TEXMF=/usr/share/texmf install-tex ############################## make DESTDIR=/public/toolchain/texinfo install make TEXMF=/public/toolchain/texinfo/usr/share/texmf install-tex for filename in `find /public/toolchain/texinfo/usr/{bin/*,sbin/*} -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # gmp 5.0.5 ./configure \ --prefix=/usr \ --enable-cxx \ --enable-mpbsd \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check 2>&1 | tee gmp-check-log awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log 166 make install ############################## make DESTDIR=/public/lib/gmp install for filename in `find /public/lib/gmp/usr/lib/*.so.* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## # mpfr 3.1.1 ./configure \ --prefix=/usr \ --enable-thread-safe \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu make make check ==================== All 160 tests passed (1 test was not run) ==================== make install ############################## make DESTDIR=/public/lib/mpfr install for filename in `find /public/lib/mpfr/usr/lib/*.so.* -type f` do echo $filename strip -R .note -R .comment "$filename" done ############################## gcc, gcj, objc separieren und zusammenpacken cd /public/toolchain find objc -type f -name '*' >objc-files find gcc -type f -name '*' >gcc-files find gcj -type f -name '*' >gcj-files sed -i 's#^gcc/##' gcc-files sed -i 's#^gcj/##' gcj-files sed -i 's#^objc/##' objc-files diff gcc-files objc-files | grep -v '<' >objc-diff-files diff gcc-files gcj-files | grep -v '<' >gcj-diff-files grep '>' objc-diff-files | sed 's#> ##' >objc-files-def grep '>' gcj-diff-files | sed 's#> ##' >gcj-files-def cd gcall tar -r -f ../gcj.tar -T ../gcj-files-def tar -r -f ../gcobjc.tar -T ../objc-files-def tar -r -f ../gcc.tar -T ../gcc-files xz -z gcc.tar xz -z gcobjc.tar xz -z gcj.tar