﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
60	Wrong gcc option for GFortran	Dave Offiler	marq	"GFortran requires gcc to use the -DNAGf90Fortran convention of cfortran.h (this appears to have changed from -Df2cFortran from 4.1.0 about 6 months ago).

The ROPP <package>/m4/cm_compiler_defualts.m4 detects 'GNU' fortran and sets the default to the f2c form. This is correct for g95, but not (now) for gfc. Adding -DNAGf90Fortran to the configure
CPPFLAGS doesn't override the default - both appear in Makefile, so presumably gcc only accespts the first occurance (the default).

While ropp_tools appears to build correctly with gfc, the print_stdout.c & print_stderr.c in messages/ are not built with the right interface; this causes dependent modules (ropp_io)
to fail ./configure, as the test for 'message' in ropp_tools fails to comple.

Hand-editing ropp_tools/build/Makefile to change AM_CPPFLAGS from 'f2c' to 'NAGf90' allows the correct C interfaces in ropp_tools to be built, and ropp_io ./configure works again with gfc. 

cm_compiler_defaults.m4 (and/or the vendor detector code in cm_compilers.m4) needs modifying to detect gfc from g95 (both report as 'GNU'). For reference, if it helps,

{{{
$ gfc --version
GNU Fortran 95 (GCC) 4.2.0 20060619 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ g95 --version
G95 (GCC 4.0.3 (g95!) Jun 18 2006)
Copyright (C) 2002-2005 Free Software Foundation, Inc.

G95 comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of G95
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
}}}

Maybe instead of 'GCC', CM_FC_VENDOR could detect as 'GNU' (GFortran) or 'G95' ?"	defect	closed	normal		ROPP (all)	0.8	fixed	GFortran	
