This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Generated files problems.
On Wed, Oct 04, 2006 at 10:15:44PM -0700, Steve Kargl wrote:
> This completes the build. However, upon inspection of the
> newly generated fraction_r4.c file via
> "svn diff generated/fraction_r4.c", I find
>
>
> Index: generated/fraction_r4.c
> ===================================================================
> --- generated/fraction_r4.c (revision 117447)
> +++ generated/fraction_r4.c (working copy)
> @@ -33,16 +33,16 @@ Boston, MA 02110-1301, USA. */
> #include "libgfortran.h"
>
>
> -#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
> +#if defined (HAVE_GFC_REAL_) && defined (HAVE_FREXP_)
>
> -extern GFC_REAL_4 fraction_r4 (GFC_REAL_4 s);
> -export_proto(fraction_r4);
> +extern GFC_REAL_ fraction_r (GFC_REAL_ s);
> +export_proto(fraction_r);
>
> -GFC_REAL_4
> -fraction_r4 (GFC_REAL_4 s)
> +GFC_REAL_
> +fraction_r (GFC_REAL_ s)
> {
> int dummy_exp;
> - return frexpf (s, &dummy_exp);
> + return frexp_ (s, &dummy_exp);
> }
>
> #endif
>
> which clearly is fucked up. So, if we have any m4/file
> generation experts out there. I'd appreciate a pointer.
>
Just an hour more and found the answer. libgfortran/Makefile.am
has m4 hardcoded all over the file. On my system, m4 is the
FreeBSD m4 utility and gm4 is the GNU m4 utility. The toplevel
configure looks for gm4 and finds it. The toplevel Makefile
exports M4=gm4 to the build environment. libgfortran never
sees nor uses M4. I'll prepare a patch tomorrow.
--
Steve