Subject: bug#10236: Enhancement: support for the nagfor compiler in Libtool

From: Juergen Reuter <[email-masked]>
Date: Tue, 6 Dec 2011 15:20:09 +0100

Dear all,
this is a bug report, but a feature request. In order to have support for the 
nagfor Fortran compiler which is used in the quality assignment of our 
software project it would be great to have included the following two minor 
changes in the libtool setup w.r.t. to  the stable version 2.4.2:

in ltmain.sh (for linking on Darwin systems only)

--- ltmain.sh	2011-12-06 14:46:16.000000000 +0100
+++ libtool-2.4.2/libltdl/config/ltmain.sh	2011-10-17 12:19:35.000000000 
+0200
@@ -7406,15 +7406,6 @@
 	  minor_current=$func_arith_result
 	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-
current_version ${wl}$minor_current.$revision"
 	  verstring="-compatibility_version $minor_current -current_version 
$minor_current.$revision"
-          # On Darwin other compilers
-          case $CC in
-              nagfor*)
-                  verstring="${wl}-compatibility_version ${wl}$minor_current 
${wl}-current_version ${wl}$minor_current.$revision"
-                  ;;
-              *)
-                  verstring="-compatibility_version $minor_current -
current_version $minor_current.$revision"
-                  ;;
-          esac
 	  ;;
 
 	freebsd-aout)

and in libtool.m4

--- libtool.m4  2011-12-06 15:04:19.000000000 +0100
+++ ../libtool-2.4.2/libltdl/m4/libtool.m4      2011-10-17 12:17:05.000000000 
+0200
@@ -1097,7 +1097,7 @@
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
-     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+     ifort*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
@@ -4307,20 +4307,6 @@
       fi
       ;;
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'       
-      case $cc_basename in 
-      nagfor*)
-       # NAG Fortran compiler
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       ;;
-      esac
-      ;;
-
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).

Cheers,
	JRR
-- 
-------------------------------------
Juergen Reuter	
*****
DESY Theory Group
Notkestrasse 85
D-22603 Hamburg
Phone: +49 (0)40 8998-3895
Fax  : +49 (0)40 8998-2777

*****
Skype: jr_reuter
-------------------------------------