libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patches for libtool support on NAG Fortran compiler for Darwin OS


From: Jürgen Reuter
Subject: Patches for libtool support on NAG Fortran compiler for Darwin OS
Date: Tue, 1 Mar 2011 12:24:39 +0100

Dear libtool team (cc to Peter)
as discussed with Peter I send to you a diff (compared to the 
2.4 official version of libtool) to support the NAG Fortran compiler
on Darwin 64bit machines.

The two changes are (also attached as diff patches):
-- in the file libtool.m4:
*****
diff -u libtool.m4 ../nag_trunk/libtool.m4
--- libtool.m4  2010-10-01 20:57:54.000000000 +0200
+++ ../../nag_trunk/m4/libtool.m4       2011-02-28 09:44:50.000000000 +0100
@@ -1053,7 +1053,7 @@
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
@@ -4245,6 +4245,19 @@
       fi
       ;;
 
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       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).

*****

sowie in ltmain.sh (as I explained in my email to Peter the nagfor 
uses gcc as a linker which then uses ld. This demands a double wrapping
through -Wl,-Wl flags)
*****
diff -u ltmain.sh ../nag_trunk/ltmain.sh
--- ltmain.sh   2011-03-01 12:18:13.000000000 +0100
+++ ../nag_trunk/ltmain.sh      2011-03-01 11:49:34.000000000 +0100
@@ -7390,7 +7390,15 @@
          func_arith $current + 1
          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)

****



Attachment: libtool.m4.diff
Description: Binary data

Attachment: ltmain.sh.diff
Description: Binary data


Cheers,
        Juergen


Jürgen Reuter
+++ +++ +++ 
DESY Theory Group
Notkestraße 85
D-22607 Hamburg, Germany
Bldg. 2a, Room 304
Tel. +49 (0)40 8998 3895
+++ +++ +++ +++ +++
Universität Freiburg
Physikalisches Institut
Hermann-Herder-Str. 3
D-79104 Freiburg, Germany
Room 803, Tel. +49 (0)761 203 8407
+++ +++ +++ +++ +++
skype: jr_reuter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]