Hello,
Craig Tierney asked whether Libtool could support the Lahey Fortran
compiler. We went through a couple of iterations on a patch off-list,
until all of the Fortran-related tests in our suites passed. The patch
below is the result.
I've put Craig in THANKS, and pushed the patch, seeing little chance of
regression here, but would of course still welcome any review.
Thanks,
Ralf
2008-08-22 Ralf Wildenhues <[EMAIL PROTECTED]>
Initial support for Lahey Fortran on GNU/Linux.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
[linux] <lf95>: Add support for Lahey Fortran 8.1.
* NEWS, THANKS: Update.
Suggested by Craig Tierney.
diff --git a/NEWS b/NEWS
index 52f8804..e0d1062 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ New in 2.2.??: 2008-08-??: git version 2.2.5a, Libtool team:
on GNU/Linux.
- Support cross compile of MinGW with Wine.
- Initial support for cegcc (Windows CE/PocketPC) cross compilation.
+ - Initial support for lf95 (Lahey Fortran 8.1) on GNU/Linux.
* Bug fixes:
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 79f58f8..fb5f178 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3992,6 +3992,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -4378,6 +4384,9 @@ _LT_EOF
tmp_addflag=' -i_dynamic -nofor_main' ;;
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf
below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;