After it was rumored that flang is able to produce executable binary code now without invoking another external Fortran compiler, I tried it out and build the complete LLVM together with Flang (flang-new) without much problems (well, one PC crashed because it needed too much memory), I tried to invoke the binary, which is called flang-new (compared to flang-to-external-fc). The letter seems to work, but obviously includes the runtime library of the external Fortran compiler (libgfortran.so.5 in my case). The “native” flang fails for me with the following error below. So flang takes /usr/bin/ld to link, and cannot find the corresponding libraries. For libFortran_main no shared library seems to have been build, while for libFortranDecimal and libFortranRuntime they are there. But even they did not seem to be found. Any ideas? Is there a LLVM/Flang tracker where I can post this?
install/bin/flang-new" -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -o /tmp/foo-3d2774.o -x f95-cpp-input foo.f90
"/usr/bin/ld" -pie -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib64/crti.o /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib /tmp/foo-3d2774.o -lFortran_main -lFortranRuntime -lFortranDecimal -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib64/crtn.o
/usr/bin/ld: cannot find -lFortran_main
/usr/bin/ld: cannot find -lFortranRuntime
/usr/bin/ld: cannot find -lFortranDecimal