libtool
[Top][All Lists]
Advanced

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

Re: Patch for Portland compiler support


From: Jeff Squyres
Subject: Re: Patch for Portland compiler support
Date: Wed, 17 Nov 2004 12:30:27 -0500

Actually, before I attempt the LT 2.x patch, how does this look for the 1.5 patch? I checked pgcc, pgCC, pgf77, and pgf90, both in the 1.5 test suite (I assuming that configuring LT with CC=pgcc [etc.] and then "make check" is what is necessary?) and with a small sample automake package that I made explicitly for testing porpoises. All seems to be working properly.

Could someone who is Wise in the Ways of Libtool tell me if this patch looks ok? I did [at least] one questionable thing: in the Linux linker section, I had to check for pgf77 or pgf90, because, contrary to the PG documentation, pgf77 and pgf90 need an additional "-fpic" in their linker command to create a shared library properly.

I'm also CC'ing the PG support team to see if they have any input.

Here's the revised patch (including some fixes from this morning; based on tests, not the PG documentation ;-) ):

-----
[9:20] hbar:~/libtool-1.5 % cvs diff libtool.m4
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.50
diff -u -r1.314.2.50 libtool.m4
--- libtool.m4  19 Sep 2004 12:13:50 -0000      1.314.2.50
+++ libtool.m4  17 Nov 2004 17:24:39 -0000
@@ -3165,6 +3165,15 @@
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
        ;;
+      pgCC)
+        # Portland Group C++ compiler (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        ;;
       cxx)
        # Compaq C++
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -4713,6 +4722,13 @@
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
            ;;
+         pgCC)
+           # Portland Group C++ compiler (*not* the Pentium gcc
+            # compiler, which looks to be a dead project)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
          cxx)
            # Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha
@@ -4952,6 +4968,13 @@
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
         ;;
+      pgcc | pgf77 | pgf90)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
       ccc*)
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         # All Alpha code is PIC.
@@ -5228,6 +5251,10 @@
   linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + # Portland Group f77 and f90 compilers require an additonal -fpic
+       if test "$CC" = "pgf77" -o "$CC" = "pgf90"; then
+          tmp_archive_cmds="$tmp_archive_cmds -fpic"
+        fi
        _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
       supports_anon_versioning=no
       case `$LD -v 2>/dev/null` in
-----

Any comments would be appreciated.  Thanks!



On Nov 17, 2004, at 9:38 AM, Ralf Wildenhues wrote:

> [snipped]
But certainly there will be more problems with pgcc?  What about pgf77
and pgCC?  Could you or one of your consumers be bothered to try
branch-2-0 of libtool (1.9f will do fine as well) and report us more
possible problems its testsuite reports (VERBOSE=x output for failed
tests is good), so that we can support it right, not only halfway?
(This is the more interesting for you since we won't bother much with
libtool-1.5 any more as soon as 2.0 is out).
> [snipped]

--
{+} Jeff Squyres
{+} address@hidden
{+} http://www.lam-mpi.org/





reply via email to

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