全部博文(327)
分类: LINUX
2009-09-09 12:07:53
tar xvf /lfs-sources/linux-2.6.22.5.tar.bz2 cd linux-2.6.22.5 make mrproper make headers_check make INSTALL_HDR_PATH=dest headers_install cp -rv dest/include/* /tools/include cd .. rm -rf linux-2.6.22.5
tar xvf /lfs-sources/glibc-2.5.1.tar.bz2 cd glibc-2.5.1 mkdir -v ../glibc-build cd ../glibc-build ../glibc-2.5.1/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 make mkdir -v /tools/etc touch /tools/etc/ld.so.conf make install cd .. rm -rf glibc-build rm -rf glibc-2.5.1
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_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include && find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` && unset GCC_INCLUDEDIR