Compilation: Download gcc1020.build from http://tinycorelinux.net/13.x/aarch64/tcz/src/gcc/ Before run, remove '--libdir=/usr/lib \' replace '--enable-languages=c,c++ \' to '--enable-languages=c,c++,fortran \' tce-load -i bash nohup bash gcc1020.build &> build.log & Packing: cd gcc-10.2.0/build 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 # main extension mkdir -p packing-main/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/ # f951, finclude mv packing/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/f* packing-main/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/ # libcaf_single.a, libcaf_single.la mv packing/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/libcaf_single.* packing-main/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/ # libgfortran.a, libgfortran.la, libgfortran.spec mv packing/usr/local/lib/libgfortran.* packing-main/usr/local/lib/ # strip --strip-debug trip --strip-debug packing-main/usr/local/lib/libgfortran.a packing-main/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/libcaf_single.a # 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/aarch64-unknown-linux-gnu/10.2.0/ f951 # liblto_plugin (75K --> 76K) mv packing/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0 \ packing-main/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/GFORTRAN-liblto_plugin.so.0.0.0 # tce.installed #!/bin/sh # LTO plugin LTO_PLUGIN='/usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/GFORTRAN-liblto_plugin.so.0.0.0' CURRENT='/usr/local/lib/bfd-plugins/liblto_plugin.so' mkdir -p /usr/local/lib/bfd-plugins cp -f $LTO_PLUGIN $CURRENT # binaries for BIN in /usr/local/bin/gfortran /usr/local/bin/aarch64-unknown-linux-gnu-gfortran /usr/local/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/f951 do [ -L $BIN ] && cp -f $(busybox realpath $BIN) $BIN done # distcc if [ -f /usr/local/tce.installed/distcc ]; then cd /usr/lib/distcc ln -s ../../local/bin/distcc gfortran ln -s ../../local/bin/distcc aarch64-unknown-linux-gnu-gfortran cd /usr/local/lib/distcc ln -s ../../bin/distcc gfortran ln -s ../../bin/distcc aarch64-unknown-linux-gnu-gfortran fi