Re: [PATCH v2 0/1] libgomp: Fix gfortran detection when program is found via PATH

Thomas Schwinge via Sourceware Forge <[email protected]> Wed, 22 Jul 2026 09:29:30 +0000
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <bmm.hkmlmw9jeo.gcc.gcc.tschwinge.172.6848.CMT@forge-stage.sourceware.org>
>From your build script/`Dockerfile`, the "second" `gcc/configure` is the rele=
vant one: that one builds the full GCC.  That has `--enable-languages=3D[...]=
,fortran`, and it does a plain `make`, so that looks alright.

Ah, of course!  You're building here a `--host=3Dx86_64-w64-mingw32`, `--targ=
et=3Dx86_64-w64-mingw32` GCC, with different `--build=3D[...]`.  That means, =
the build system cannot use the `--host=3Dx86_64-w64-mingw32` GCC to build th=
e `--target=3Dx86_64-w64-mingw32` libraries, so per <https://gcc.gnu.org/onli=
nedocs/gccint/Configure-Terms.html>, "you must have already built and install=
ed 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,conf=
ig.status}`, and `x86_64-pc-linux-gnu/libgomp/{Makefile,config.log,config.sta=
tus}`, 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