tc6_x86_64 (on corepure64) tce-load -i compiletc perl5 ncurses-dev bash cloog-dev mpc-dev udev-lib-dev texinfo gettext coreutils export TC64=/mnt/tc_64 sudo mkdir $TC64 sudo mount /dev/sdb2 $TC64 sudo mkdir $TC64/tools64 sudo chown tc:staff $TC64/tools64 sudo ln -s $TC64/tools64 / [***] sudo mkdir $TC64/sources sudo chown tc:staff $TC64/sources cat > ~/.bash_profile << "EOF" exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash EOF cat > ~/.bashrc << "EOF" set +h umask 022 TC64=/mnt/tc_64 LC_ALL=POSIX TC64_TGT=x86_64-tc-linux-gnu PATH=/tools64/bin:/usr/local/bin:/bin:/usr/bin export TC64 LC_ALL TC64_TGT PATH EOF source ~/.bash_profile cd binutils-2.24.51 mkdir ../binutils-build cd ../binutils-build ../binutils-2.24.51/configure --prefix=/tools64 --with-sysroot=$TC64 --with-lib-path=/tools64/lib --target=$TC64_TGT --disable-nls --disable-werror make make install cd gcc-4.9.1 tar -xf ../mpfr-3.1.2.tar.xz mv mpfr-3.1.2 mpfr tar -xf ../gmp-6.0.0a.tar.xz mv gmp-6.0.0 gmp tar -xf ../mpc-1.0.2.tar.gz mv mpc-1.0.2 mpc for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp $file $file.orig sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools64&@g' -e 's@/usr@/tools64@g' $file.orig > $file echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 "/tools64/lib/" #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file touch $file.orig done Correct gcc/config/i386/linux64.h #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib64/ld-linux-x86-64.so.2" to #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib/ld-linux-x86-64.so.2" sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c mkdir ../gcc-build cd ../gcc-build ../gcc-4.9.1/configure --target=$TC64_TGT --prefix=/tools64 --with-sysroot=$TC64 --with-newlib --without-headers --with-local-prefix=/tools64 --with-native-system-header-dir=/tools64/include --libdir=/tools64/lib --libexecdir=/tools64/lib --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libatomic --disable-libgomp --disable-libitm --disable-libquadmath --disable-libsanitizer --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libstdc++-v3 --enable-languages=c,c++ make [18m6.044s] make install cd linux-3.16.2 make mrproper make INSTALL_HDR_PATH=dest headers_install cp -r dest/include/* /tools64/include cd glibc-2.20 mkdir ../glibc-build cd ../glibc-build note ../glibc-2.20/scripts/config.guess -> 86_64-unknown-linux-gnu ../glibc-2.20/configure --prefix=/tools64 --host=$TC64_TGT --build=$(../glibc-2.20/scripts/config.guess) --disable-profile --enable-kernel=3.8.13 --with-headers=/tools64/include libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes make [10m9.861s] make install echo 'main(){}' > dummy.c $TC64_TGT-gcc dummy.c readelf -l a.out | grep ': /tools64' [Requesting program interpreter: /tools64/lib/ld-linux-x86-64.so.2] rm dummy.c a.out cd gcc-4.9.1 mkdir ../gcc-build cd ../gcc-build ../gcc-4.9.1/libstdc++-v3/configure --host=$TC64_TGT --prefix=/tools64 --libdir=/tools64/lib --disable-multilib --disable-shared --disable-nls --disable-libstdcxx-threads --disable-libstdcxx-pch --with-gxx-include-dir=/tools64/$TC64_TGT/include/c++/4.9.1 find . -name Makefile -type f -exec sed -i 's/lib64/lib/g' {} \; make make install ---------- cd binutils-2.24.51 mkdir ../binutils-build cd ../binutils-build CC=$TC64_TGT-gcc AR=$TC64_TGT-ar RANLIB=$TC64_TGT-ranlib ../binutils-2.24.51/configure --prefix=/tools64 --disable-nls --disable-werror --with-lib-path=/tools64/lib --with-sysroot make make install make -C ld clean make -C ld LIB_PATH=/usr/lib:/lib cp ld/ld-new /tools64/bin cd gcc-4.9.1 cat gcc/limitx.h gcc/glimits.h gcc/limity.h > `dirname $($TC64_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp $file $file.orig sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools64&@g' -e 's@/usr@/tools64@g' $file.orig > $file echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 "/tools64/lib/" #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file touch $file.orig done Correct gcc/config/i386/linux64.h #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib64/ld-linux-x86-64.so.2" to #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib/ld-linux-x86-64.so.2" tar -xf ../mpfr-3.1.2.tar.xz mv mpfr-3.1.2 mpfr tar -xf ../gmp-6.0.0a.tar.xz mv gmp-6.0.0 gmp tar -xf ../mpc-1.0.2.tar.gz mv mpc-1.0.2 mpc sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c mkdir ../gcc-build cd ../gcc-build CC=$TC64_TGT-gcc CXX=$TC64_TGT-g++ AR=$TC64_TGT-ar RANLIB=$TC64_TGT-ranlib ../gcc-4.9.1/configure --prefix=/tools64 --with-local-prefix=/tools64 --with-native-system-header-dir=/tools64/include --libdir=/tools64/lib --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp make [24m13.901s] make install ln -s gcc /tools64/bin/cc echo 'main(){}' > dummy.c cc dummy.c readelf -l a.out | grep ': /tools64' [Requesting program interpreter: /tools64/lib/ld-linux-x86-64.so.2] rm dummy.c a.out correct *la and move lib64 -> lib ---------- cd ncurses-5.9 ./configure --prefix=/tools64 --with-shared --without-debug --without-ada --enable-widec --enable-overwrite make make install cd bash-4.3 ./configure --prefix=/tools64 --without-bash-malloc make make install ln -s bash /tools64/bin/sh cd bzip2-1.0.6 make make PREFIX=/tools64 install cd coreutils-8.23 ./configure --prefix=/tools64 --enable-install-program=hostname make make install cd diffutils-3.3 ./configure --prefix=/tools64 make make install cd file-5.19 ./configure --prefix=/tools64 make make install cd findutils-4.4.2 ./configure --prefix=/tools64 make make install cd gawk-4.1.1 ./configure --prefix=/tools64 make make install cd gettext-0.19.2 cd gettext-tools EMACS="no" ./configure --prefix=/tools64 --disable-shared make -C gnulib-lib make -C src msgfmt make -C src msgmerge make -C src xgettext cp src/msgfmt /tools64/bin cp src/msgmerge /tools64/bin cp src/xgettext /tools64/bin cd grep-2.20 ./configure --prefix=/tools64 make make install cd gzip-1.6 ./configure --prefix=/tools64 make make install cd m4-1.4.17 ./configure --prefix=/tools64 make make install cd make-4.0 ./configure --prefix=/tools64 --without-guile make make install cd patch-2.7.1 ./configure --prefix=/tools64 make make install cd perl-5.20.0 sh Configure -des -Dprefix=/tools64 -Dlibs=-lm make cp perl cpan/podlators/pod2man /tools64/bin mkdir -p /tools64/lib/perl5/5.20.0 cp -R lib/* /tools64/lib/perl5/5.20.0 cd sed-4.2.2 ./configure --prefix=/tools64 make make install cd tar-1.28 ./configure --prefix=/tools64 make make install cd texinfo-5.2 ./configure --prefix=/tools64 make make install cd util-linux-2.25.1 ./configure --prefix=/tools64 --without-python --disable-makeinstall-chown --without-systemdsystemunitdir PKG_CONFIG="" make make install cd xz-5.0.5 ./configure --prefix=/tools64 make make install ---------- sudo chown -R root:root $TC64/tools64 sudo mkdir -p $TC64/dev sudo mkdir -p $TC64/proc sudo mkdir -p $TC64/sys sudo mkdir -p $TC64/run sudo mknod -m 600 $TC64/dev/console c 5 1 sudo mknod -m 666 $TC64/dev/null c 1 3 sudo mount --bind /dev $TC64/dev sudo mount -t devpts devpts $TC64/dev/pts -o gid=5,mode=620 sudo mount -t proc proc $TC64/proc sudo mount -t sysfs sysfs $TC64/sys sudo mount -t tmpfs tmpfs $TC64/run sudo chroot "$TC64" /tools64/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools64/bin /tools64/bin/bash --login +h ---------- mkdir -p /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt} mkdir -p /{media/{floppy,cdrom},sbin,srv,var} install -d -m 0750 /root install -d -m 1777 /tmp /var/tmp mkdir -p /usr/{,local/}{bin,include,lib,sbin,src} mkdir -p /usr/{,local/}share/{color,dict,doc,info,locale,man} mkdir /usr/{,local/}share/{misc,terminfo,zoneinfo} mkdir -p /usr/{,local/}share/man/man{1..8} mkdir /var/{log,mail,spool} ln -s /run /var/run ln -s /run/lock /var/lock mkdir -p /var/{opt,cache,lib/{color,misc,locate},local} ln -s /tools64/bin/{bash,cat,echo,pwd,stty} /bin ln -s /tools64/bin/perl /usr/bin ln -s /tools64/lib/libgcc_s.so{,.1} /usr/lib ln -s /tools64/lib/libstdc++.so{,.6} /usr/lib sed 's/tools64/usr/' /tools64/lib/libstdc++.la > /usr/lib/libstdc++.la ln -s bash /bin/sh ln -s /proc/self/mounts /etc/mtab [copy tc /etc/passwd and /etc/group files to $TC64/etc] exec /tools64/bin/bash --login +h touch /var/log/{btmp,lastlog,wtmp} chmod 664 /var/log/lastlog chmod 600 /var/log/btmp ---------- cd linux-3.16.2 make mrproper make INSTALL_HDR_PATH=dest headers_install find dest/include \( -name .install -o -name ..install.cmd \) -delete cp -r dest/include/* /usr/include cd glibc-2.20 patch -Np1 -i ../glibc-2.20-fhs-1.patch mkdir ../glibc-build cd ../glibc-build echo "CFLAGS += -mtune=generic -Os -pipe" > configparms ../glibc-2.20/configure --prefix=/usr --libexecdir=/usr/lib/glibc --disable-profile --enable-kernel=3.8.13 --enable-obsolete-rpc find . -name config.make -type f -exec sed -i 's/-O2/ /g' {} \; find . -name config.make -type f -exec sed -i 's/lib64/lib/g' {} \; make touch /etc/ld.so.conf Correct elf/ldd lib64 -> lib make install cp ../glibc-2.20/nscd/nscd.conf /etc/nscd.conf mkdir -p /var/cache/nscd make localedata/install-locales [copy tc /etc/nsswitch.conf and /etc/ld.so.conf files to $TC64/etc] mv /tools64/bin/{ld,ld-old} mv /tools64/$(gcc -dumpmachine)/bin/{ld,ld-old} [gcc -dumpmachine -> x86_64-unknown-linux-gnu] mv /tools64/bin/{ld-new,ld} ln -s /tools64/bin/ld /tools64/$(gcc -dumpmachine)/bin/ld gcc -dumpspecs | sed -e 's@/tools64@@g' -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > `dirname $(gcc --print-libgcc-file-name)`/specs [/tools64/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/libgcc.a] echo 'main(){}' > dummy.c cc dummy.c -v -Wl,--verbose &> dummy.log readelf -l a.out | grep ': /lib' [Requesting program interpreter: /lib/ld-linux-x86-64.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("/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-x86-64.so.2 at /lib/ld-linux-x86-64.so.2 rm -v dummy.c a.out dummy.log ---------- cd zlib-1.2.8 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr find . -name Makefile -type f -exec sed -i 's/-O3/ /g' {} \; make make install export PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin:/tools64/bin cd file-5.19 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local make make install cd binutils-2.24.51 rm -f etc/standards.info sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in mkdir ../binutils-build cd ../binutils-build CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ../binutils-2.24.51/configure --prefix=/usr --enable-shared --disable-werror --enable-lto --enable-plugins find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make tooldir=/usr make tooldir=/usr install cd gmp-6.0.0 mv config{fsf,}.guess mv config{fsf,}.sub ABI=64 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ./configure --prefix=/usr --enable-cxx --docdir=/usr/share/doc/gmp-6.0.0a make make install cd mpfr-3.1.2 patch -Np1 -i ../mpfr-3.1.2-upstream_fixes-2.patch CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ./configure --prefix=/usr --enable-thread-safe --docdir=/usr/share/doc/mpfr-3.1.2 make make install cd mpc-1.0.2 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ./configure --prefix=/usr --docdir=/usr/share/doc/mpc-1.0.2 make make install cd isl-0.12.2 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ./configure --prefix=/usr make make install cd cloog-0.18.1 CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ./configure --prefix=/usr --with-isl=system make make install cd gcc-4.9.1 sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c patch -Np1 -i ../gcc-4.9.1-upstream_fixes-1.patch Correct gcc/config/i386/linux64.h #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib64/ld-linux-x86-64.so.2" to #define GLIBC_DYNAMIC_LINKER64 "/tools64/lib/ld-linux-x86-64.so.2" mkdir ../gcc-build cd ../gcc-build SED=sed CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" ../gcc-4.9.1/configure --prefix=/usr --enable-shared --libexecdir=/usr/lib --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --enable-frame-pointer --enable-lto find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \; find . -name config.status -type f -exec sed -i 's/-O2//g' {} \; make [19m8.281s] make install ln -s ../usr/bin/cpp /lib ln -s gcc /usr/bin/cc install -dm755 /usr/lib/bfd-plugins ln -sf ../../lib/gcc/$(gcc -dumpmachine)/4.9.1/liblto_plugin.so /usr/lib/bfd-plugins/ mkdir -p /usr/share/gdb/auto-load/usr/lib mv /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib Correct *la and move libs /usr/lib64 -> /usr/lib echo 'main(){}' > dummy.c cc dummy.c -v -Wl,--verbose &> dummy.log readelf -l a.out | grep ': /lib' [Requesting program interpreter: /lib/ld-linux-x86-64.so.2] grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../crt1.o succeeded /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../crti.o succeeded /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../crtn.o succeeded grep -B4 '^ /usr/include' dummy.log #include <...> search starts here: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include /usr/local/include /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed /usr/include grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64") SEARCH_DIR("/usr/local/lib64") SEARCH_DIR("/lib64") SEARCH_DIR("/usr/lib64") SEARCH_DIR("/usr/x86_64-unknown-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-x86-64.so.2 at /lib/ld-linux-x86-64.so.2 rm dummy.c a.out dummy.log ---------- cd binutils-2.24.51 rm -f etc/standards.info sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in mkdir ../binutils-build cd ../binutils-build CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe" ../binutils-2.24.51/configure --prefix=/usr --enable-shared --disable-werror --enable-lto --with-mpc=/usr --with-mpfr=/usr --with-gmp=/usr --with-cloog=/usr --with-isl=/usr --enable-plugins find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make tooldir=/usr make tooldir=/usr install cd zlib-1.2.8 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr find . -name Makefile -type f -exec sed -i 's/-O3/ /g' {} \; make make install cd file-5.19 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd bzip2-1.0.6 Edit Makefile-libbz2_so CC=gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe CFLAGS=-fpic -fPIC -Wall -Winline $(BIGFILES) make -f Makefile-libbz2_so make clean patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile Edit Makefile CC=gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe CFLAGS=-Wall -Winline $(BIGFILES) make make PREFIX=/usr/local install cp bzip2-shared /usr/local/bin/bzip2 cp -a libbz2.so* /usr/local/lib cd /usr/local/lib ln -s libbz2.so.1.0 libbz2.so cd ../bin rm {bunzip2,bzcat} ln -s bzip2 bunzip2 ln -s bzip2 bzcat cd pkg-config-0.28 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --with-pc-path="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/share/pkgconfig" --with-internal-glib --disable-host-tool --docdir=/usr/share/doc/pkg-config-0.28 find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd ncurses-5.9 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr --mandir=/usr/share/man --with-shared --without-debug --enable-pc-files --enable-overwrite find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd attr-2.4.47 sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/builddefs.in CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install install-dev install-lib chmod 755 /usr/local/lib/libattr.so cd acl-2.2.52 sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/builddefs.in sed -i "s:| sed.*::g" test/{sbits-restore,cp,misc}.test sed -i -e "/TABS-1;/a if (x > (TABS-1)) x = (TABS-1);" libacl/__acl_to_any_text.c CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --libexecdir=/usr/local/lib find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install install-dev install-lib chmod 755 /usr/local/lib/libacl.so cd libcap-2.24 edit Make.rules CC := gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe CFLAGS := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 make make RAISE_SETFCAP=no prefix=/usr/local install chmod 755 /usr/local/lib/libcap.so cd sed-4.2.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd e2fsprogs-1.42.12 mkdir build cd build LIBS=-L/tools64/lib CFLAGS=-I/tools64/include PKG_CONFIG_PATH=/tools64/lib/pkgconfig CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ../configure --prefix=/usr --bindir=/bin --with-root-prefix="" --enable-elf-shlibs --disable-libblkid --disable-libuuid --disable-uuidd --disable-fsck find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install make install-libs chmod u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a cd coreutils-8.23 patch -Np1 -i ../coreutils-8.23-i18n-1.patch touch Makefile.in FORCE_UNSAFE_CONFIGURE=1 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --enable-no-install-program=kill,uptime --libexecdir=/usr/local/lib find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd m4-1.4.17 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd flex-2.5.39 sed -i -e '/test-bison/d' tests/Makefile.in CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd /usr/local/bin ln -s flex lex cd bison-3.0.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd grep-2.20 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd readline-6.3 patch -Np1 -i ../readline-6.3-upstream_fixes-2.patch sed -i '/MV.*old/d' Makefile.in sed -i '/{OLDSUFF}/c:' support/shlib-install CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make SHLIB_LIBS=-lncurses make SHLIB_LIBS=-lncurses install cd bash-4.3 patch -Np1 -i ../bash-4.3-upstream_fixes-3.patch CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --without-bash-malloc --with-installed-readline find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd /bin rm bash ln -s /usr/local/bin/bash bash exec /bin/bash --login +h cd bc-1.06.95 patch -Np1 -i ../bc-1.06.95-memory_leak-1.patch CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --with-readline find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd libtool-2.4.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd gdbm-1.11 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --enable-libgdbm-compat find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd expat-2.1.0 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd perl-5.20.0 cp tc /etc/hosts export BUILD_ZLIB=False export BUILD_BZIP2=0 sh Configure -des -Dcc="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" -Dprefix=/usr/local -Dvendorprefix=/usr/local -Dman1dir=/usr/local/share/man/man1 -Dman3dir=/usr/local/share/man/man3 -Dpager="/usr/bin/less -isR" -Duseshrplib find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install unset BUILD_ZLIB BUILD_BZIP2 rm /usr/bin/perl rm /bin/{cat,echo,pwd,stty} cd /bin ln -s /usr/local/bin/cat cat ln -s /usr/local/bin/echo echo ln -s /usr/local/bin/pwd pwd ln -s /usr/local/bin/stty stty cd XML-Parser-2.42_01 perl Makefile.PL make make install cd autoconf-2.69 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd automake-1.14.1 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd diffutils-3.3 sed -i 's:= @mkdir_p@:= /bin/mkdir -p:' po/Makefile.in.in CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd gawk-4.1.1 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --libexecdir=/usr/local/lib/gawk find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd findutils-4.4.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var/lib/locate --libexecdir=/usr/local/lib/findutils find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd gettext-0.19.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd intltool-0.50.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd gperf-3.0.4 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd groff-1.22.2 PAGE=A4 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd xz-5.0.5 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd gzip-1.6 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd make-4.0 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd patch-2.7.1 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd tar-1.28 FORCE_UNSAFE_CONFIGURE=1 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --libexecdir=/usr/local/lib/tar find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install cd texinfo-5.2 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make make install make TEXMF=/usr/local/share/texmf install-tex cd util-linux-2.25.1 add tty:x:4: to /etc/group exec /usr/local/bin/bash --login +h mkdir -p /var/lib/hwclock sed -e 's/2^64/(2^64/' -e 's/E lib [remove binutils, gmp, mpfr, mpc, isl, cloog from /usr] [remove gcc, except libgcc, libstdc++ from /usr] [remove libgcc, libstdc++ from /usr/local] cd util-linux-2.25.1 add tty:x:4: to /etc/groups exec /usr/local/bin/bash --login +h mkdir -p /var/lib/hwclock sed -e 's/2^64/(2^64/' -e 's/E