<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">I have been trying to build MPICH with Clang + Flang. If I build it with clang without Fortran support, it works fine, but if I try to build it with Flang for Fortran, I get an unknown argument error in the final link step. <div><br></div><div><div>clang-5.0: error: unsupported option '--whole-archive'</div><div>clang-5.0: error: unsupported option '--no-whole-archive'</div><div>clang-5.0: error: unknown argument: '-soname'</div><div>clang-5.0: error: no such file or directory: 'libmpi.so.12'</div></div><div><br></div><div>This seems to be because --whole-archive is passed to clang without prepending it with -Wl,. So I hacked the libtool script to force it to add the "-Wl". </div><div><br></div><div>Now I get another error saying: </div><div><br></div><div>usr/bin/ld: src/binding/fortran/mpif_h/.libs/setbotf.o: relocation R_X86_64_32 against undefined symbol `mpipriv1_' can not be used when making a shared object; recompile with -fPIC<br></div><div><div><br></div><div>Could this be because the build system does not recognize/support flang? If so, is there a way to work around it? If not, I'd appreciate some help in trying to get it built. </div><div><br></div><div>Thanks,</div><div><br></div><div>Tarun</div><div><br></div></div></div>