Compiled on X8DTU with 2 physical Intel Xeon E5530 CPU (8C16T) Compile Flags: unset CFLAGS CXXFLAGS LDFLAGS Dependencies: (some of them are not required, I'm just following 'compile_tc12_x86_64' to be safe) tce-load -i compiletc perl5 ncursesw-dev bash mpc-dev udev-lib-dev texinfo coreutils glibc_apps rsync gettext python3.6 git Commands: cd gcc-10.2.0 sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 ### edit gcc/config/i386/linux64.h ### #define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" ### edit with sed sed -i '/GLIBC_DYNAMIC_LINKER64/ s:/lib64/:/lib/:' gcc/config/i386/linux64.h mkdir build cd build CC="gcc -mtune=generic -Os -pipe" CXX="g++ -mtune=generic -Os -pipe" ../configure --prefix=/usr/local --enable-languages=c,c++,fortran --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; find . -name Makefile -type f -exec sed -i 's/-O2 -g//g' {} \; find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \; time make -j15 real 7m 46.25s user 1h 10m 04s sys 4m 23.12s make DESTDIR=/tmp/packing install cd /tmp mkdir -p packing-lib/usr/local/lib # shared objects first mv /tmp/packing/usr/local/lib/libgfortran.so* packing-lib/usr/local/lib strip --strip-unneeded packing-lib/usr/local/lib/libgfortran.so.5.0.0 mkdir -p packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/ # f951 mv packing/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/f951 packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/ # finclude/ mv packing/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/finclude/ packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/ # libcaf_single.a, libcaf_single.la mv packing/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libcaf_single.* packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/ # libgfortran.a, libgfortran.la, libgfortran.spec mv packing/usr/local/lib/libgfortran.* packing-main/usr/local/lib/ # binaries mkdir packing-main/usr/local/bin mv packing/usr/local/bin/*gfortran packing-main/usr/local/bin strip --strip-unneeded packing-main/usr/local/bin/* packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/f951 # liblto_plugin (75K --> 76K) mv packing/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/liblto_plugin.so.0.0.0 packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/GFORTRAN-liblto_plugin.so.0.0.0 strip --strip-unneeded packing-main/usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/GFORTRAN-liblto_plugin.so.0.0.0 # tce.installed #!/bin/sh TEMPDIR=$(mktemp -d) cp /usr/local/bin/gfortran $TEMPDIR mv -f ${TEMPDIR}/gfortran /usr/local/bin cp /usr/local/bin/x86_64-pc-linux-gnu-gfortran $TEMPDIR mv -f ${TEMPDIR}/x86_64-pc-linux-gnu-gfortran /usr/local/bin cp /usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/f951 $TEMPDIR mv -f ${TEMPDIR}/f951 /usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0 rm -fr $TEMPDIR mkdir -p /usr/local/lib/bfd-plugins cp -f /usr/local/lib/gcc/x86_64-pc-linux-gnu/10.2.0/GFORTRAN-liblto_plugin.so.0.0.0 /usr/local/lib/bfd-plugins/liblto_plugin.so