Dear all,

the attached patch changes the order of the 'verbose' options in _AC_PROG_FC_V in order to get correct verbose linking output for the Fujitsu Fortran compiler.

The Fujitsu Fortran compiler reports its verbose linking output when the '-###' option is given. Unfortunately it also accepts '--verbose', which is earlier in the list of tested options. '--verbose' is passed to the linker and yields unusable output. Therefore, move '--verbose' after '-###'.

Earlier versions of the Fujitsu Fortran compiler apparently choked on '--verbose', otherwise [1] would have been proposed differently.

Tested with the Fujitsu cross compiler frtpx:
  Fujitsu Fortran Compiler Driver Version 1.2.0 P-id:
  L30000-06 (Jun  7 2013 10:24:51) K-1.2.0-14

Christian

[1] http://cygwin.com/ml/autoconf-patches/2001-06/msg00000.html
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index f20b029..2e640f2 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -578,6 +578,8 @@ esac
 # information of library and object files (normally -v)
 # Needed for _AC_FC_LIBRARY_FLAGS
 # Some compilers don't accept -v (Lahey: (-)-verbose, xlf: -V, Fujitsu: -###)
+# Fujitsu accepts --verbose and passes it to the linker, which doesn't yield
+# the desired result. Therefore test for -### before testing for --verbose.
 AC_DEFUN([_AC_PROG_FC_V],
 [_AC_FORTRAN_ASSERT()dnl
 AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]],
@@ -585,7 +587,7 @@ AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]],
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
 [ac_cv_prog_[]_AC_LANG_ABBREV[]_v=
 # Try some options frequently used verbose output
-for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+for ac_verb in -v -verbose -V -\#\#\# --verbose; do
   _AC_PROG_FC_V_OUTPUT($ac_verb)
   # look for -l* and *.a constructs in the output
   for ac_arg in $ac_[]_AC_LANG_ABBREV[]_v_output; do

Reply via email to