[libgfortran,patch] Add compiler check when configuring libgfortran

Matt Fago fago@earthlink.net
Tue Jan 9 16:42:00 GMT 2007


> Attached patch fixes a long-standing bug in libgfortran configury by
> adding an explicit check that we have a working gfortran compiler, and
> otherwise error out. Without this patch, a miscompiled (or mislinked)
> gfortran will only induce an error late in the libgfortran build, and
> with a very cryptic error message (see PR 26893 for details). With
> this patch, a non usable compiler will yield the following error
> message:
>
> checking whether the GNU Fortran compiler is working... no
> configure: error: GNU Fortran is not working; please report a bug in
> http://gcc.gnu.org/bugzilla, attaching
> /home/fxcoudert/svn/debug3/ibin/i686-pc-linux-gnu/libgfortran/config.log


I would note that a similar error can now happen on trunk with gcc. In 
particular, if you need to use --with-mpfr-lib (etc, or similar) and you do not 
have, e.g., LD_LIBRARY_PATH or ld.so.conf set correctly then gfortran
(and gcc if on trunk) fail during bootstrap as stated. The current error 
messages for gcc anyhow are much more useful on trunk than 4.1.x: 
"ldd: cannot find libmpfr.so" (or similar).

I suppose one could argue that the host operating system is mis-configured
in this case. Nevertheless if something can be done to make this easier.

Would linking statically to mpfr/gmp help this (does this even make sense)?

 - Matt




More information about the Fortran mailing list