I was able to easily satisfy the libisl.so.13 dependency:
curl -O http://isl.gforge.inria.fr/isl-0.13.tar.xz
tar x -J -f isl-0.13.tar.xz
cd isl-0.13
tce-load -i gmp-dev
./configure && make && sudo make install
sudo ldconfig
Then I ran into a new dependency error (libmpfr.so.4):
/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0/f951: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
I found I had mpfr.tcz installed, but for some reason it contains libmpfr.so.6 instead of .4 -- funny because the package description claims it is version 4! Anyway, this was solved by:
sudo ln -s /usr/local/lib/libmpfr.so /usr/local/lib/libmpfr.so.4
sudo ldconfig
... maybe this will cause unintended consequences in the future, though.
Anyway, the REAL dead-end was liblto_plugin.so:
gfortran: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
I found I do have this file:
$ sudo find / -name liblto_plugin.so
/tmp/tcloop/gcc/usr/local/lib/bfd-plugins/liblto_plugin.so
/tmp/tcloop/gcc/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0/liblto_plugin.so
/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0/liblto_plugin.so
/usr/local/lib/bfd-plugins/liblto_plugin.so
However, no combination of copying that file everywhere or setting LD_LIBRARY_PATH, LIBRARY_PATH, LDLIBS, LDFLAGS was able to even slightly change that error line.
Except for -fno-use-linker-plugin, but it didn't help much either:
ld: cannot find crtbegin.o: No such file or directory
ld: cannot find -lgcc
I don't know if this entire post belongs here. I just wanted to write this before I got some sleep.
Any help is greatly appreciated.
PS: gfortran.tcz is a bit outdated -- 5.2.0 (2015) while gcc.tcz is 8.2.0 (2018)