>From your build script/`Dockerfile`, the "second" `gcc/configure` is the >relevant one: that one builds the full GCC. That has >`--enable-languages=[...],fortran`, and it does a plain `make`, so that looks >alright.
Ah, of course! You're building here a `--host=x86_64-w64-mingw32`, `--target=x86_64-w64-mingw32` GCC, with different `--build=[...]`. That means, the build system cannot use the `--host=x86_64-w64-mingw32` GCC to build the `--target=x86_64-w64-mingw32` libraries, so per <https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html>, "you must have already built and installed a cross compiler that will be used to build the target libraries", so that's exactly what you're doing (your "first" GCC), and you're now tripping over the fact that the "second" GCC doesn't recognize the "first" GCC's `gfortran`. Now I understand the problem. Can you please attach the "second" GCC's top-level `{Makefile,config.log,config.status}`, and `x86_64-pc-linux-gnu/libgomp/{Makefile,config.log,config.status}`, so that I can understand how `GFORTRAN_FOR_TARGET` etc. are set up in that case? -- https://forge.sourceware.org/gcc/gcc/pulls/172#issuecomment-6848
