From ea837b92019de27f4ef5497043b1c63e2d590ee7 Mon Sep 17 00:00:00 2001 From: Ethan Mallove Date: Fri, 19 Nov 2010 22:09:37 +0000 Subject: [PATCH] Add Libtool patch to autogen.pl for Sun Studio Fortran linker options This commit was SVN r24075. --- autogen.pl | 5 ++++ config/Makefile.am | 1 + config/libtool-sun-fortran.diff | 42 +++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 config/libtool-sun-fortran.diff diff --git a/autogen.pl b/autogen.pl index 6453a54ee1..5a86929df0 100755 --- a/autogen.pl +++ b/autogen.pl @@ -1,6 +1,7 @@ #!/usr/bin/env perl # # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. # # $COPYRIGHT$ # @@ -1117,6 +1118,10 @@ close(OUT); safe_system("cp configure.patched configure"); unlink("configure.patched"); +# Patch libtool.m4 so that the correct linker options are used in +# all versions of Sun Studio Fortran +verbose "=== Patching Sun Studio Fortran version strings in libtool.m4\n"; +system("patch -N -p0 < config/libtool-sun-fortran.diff >/dev/null 2>&1"); #--------------------------------------------------------------------------- verbose " diff --git a/config/Makefile.am b/config/Makefile.am index 0021de7322..3b707ba2eb 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -24,6 +24,7 @@ EXTRA_DIST = \ opal_get_version.m4sh \ libltdl-preopen-error.diff \ ltmain_pgi_tp.diff \ + libtool-sun-fortran.diff \ ompi_mca_priority_sort.pl maintainer-clean-local: diff --git a/config/libtool-sun-fortran.diff b/config/libtool-sun-fortran.diff new file mode 100644 index 0000000000..b5fd308a26 --- /dev/null +++ b/config/libtool-sun-fortran.diff @@ -0,0 +1,42 @@ +--- config/libtool.m4 ++++ config/libtool.m4 +@@ -4024,12 +4024,17 @@ + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; +- *Sun\ F*) ++ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; ++ *Sun\ F* | *Sun*Fortran*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ++ ;; + esac + ;; + esac +--- opal/libltdl/m4/libtool.m4 ++++ opal/libltdl/m4/libtool.m4 +@@ -4024,12 +4024,17 @@ + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; +- *Sun\ F*) ++ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; ++ *Sun\ F* | *Sun*Fortran*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ++ ;; + esac + ;; + esac