[PATCH] Recognize new Nvidia HPC-SDK compilers.

Tin Huynh <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <MWHPR12MB1776DBA7B6EC330EA7DBCBA5AB490@MWHPR12MB1776.namprd12.prod.outlook.com>
With the release of HPC-SDK, updating Libtool to recognize Nvidia
compilers (nvc, nvc++, nvfortran).
---
m4/libtool.m4 | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f2d1f39..4eac689 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4402,8 +4402,8 @@ m4_if([$1], [CXX], [
                   _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
                   _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
                   ;;
-                pgCC* | pgcpp*)
-                  # Portland Group C++ compiler
+               pgCC* | pgcpp* | pgc\+\+* |  nvc\+\+*)
+                 # NVIDIA HPC C++ compiler
                   _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
                   _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
                   _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4739,9 +4739,8 @@ m4_if([$1], [CXX], [
               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
               _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
               ;;
-      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-              # which looks to be a dead project)
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
+      # NVIDIA HPC Compilers
               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4781,7 +4780,7 @@ m4_if([$1], [CXX], [
                 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
                 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
                 ;;
-              *Portland\ Group*)
+             *Portland\ Group* | *NVIDIA\ Compilers* | *PGI\ Compilers*)
                 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
                 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
                 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5209,12 +5208,12 @@ _LT_EOF
               tmp_addflag=' $pic_flag'
               tmp_sharedflag='-shared'
               case $cc_basename,$host_cpu in
-        pgcc*)                                                        # Portland Group C compiler
+        pgcc* | nvc)                                                            # NVIDIA HPC C++ Compiler
                 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
                 tmp_addflag=' $pic_flag'
                 ;;
-              pgf77* | pgf90* | pgf95* | pgfortran*)
-                                                                              # Portland Group f77 and f90 compilers
+             pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
+                                                                             # NVIDIA HPC Fortran Compilers
                 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
                 tmp_addflag=' $pic_flag -Mnomain' ;;
               ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
@@ -7004,8 +7003,8 @@ if test yes != "$_lt_caught_CXX_error"; then
                   _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
                   _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
                   ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
+          pgCC* | pgcpp* | pgc\+\+* | nvc\+\+*)
+            # NVIDIA HPC C++ compiler
                   case `$CC -V` in
                   *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
                     _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
--
2.7.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.