libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] Recognize new Nvidia HPC-SDK compilers.


From: Tin Huynh
Subject: [PATCH] Recognize new Nvidia HPC-SDK compilers.
Date: Fri, 7 Aug 2020 15:51:38 +0000

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

 


reply via email to

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