libtool-patches
[Top][All Lists]
Advanced

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

Re: --whole-archive with pgcc


From: Ralf Wildenhues
Subject: Re: --whole-archive with pgcc
Date: Thu, 17 Mar 2005 14:00:37 +0100
User-agent: Mutt/1.4.1i

Hi Peter,

[ old patch long applied ]

* Peter O'Gorman wrote on Thu, Feb 24, 2005 at 05:20:04AM CET:
>
> 2005-02-24  Peter O'Gorman  <address@hidden>
> 
>       * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): The Portland group's 
>       compiler does not pass --whole-archive. Move gnu ld check for 
>       the flag to the top so it can be overridden.
>       (AC_LIBTOOL_LANG_CXX_CONFIG): Unset whole_archive_flag_spec for
>       the portland group's c++ compiler too.
>       Reported by Jeff Squyres <address@hidden>

> --- libtool.m4 3 Feb 2005 15:01:20 -0000 1.314.2.67
> +++ libtool.m4 24 Feb 2005 04:18:09 -0000
> @@ -3178,6 +3178,7 @@ case $host_os in
>  
>       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
>       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
> +     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
*snip*

It just occurred to me that we could use the same trick as Albert put in
for the Solaris C++ compiler, and thus won't have to fall back to the
slow extraction method.

OK to apply, all branches?  It passed `make check' with pgcc/pgCC/pgf77,
thanks again to Jeff for providing a login.

Or maybe we should start thinking about a different way to allow for
linker options to be joined..

Regards,
Ralf


        * m4/libtool.m4 [ linux ]: For Portland pgcc, pgCC, pgf77,
        reinstate whole_archive_flag_spec with a workaround for passing
        the libs comma-separated on the link line.

--- m4/libtool.m4       16 Mar 2005 17:27:35 -0000      1.171
+++ m4/libtool.m4       16 Mar 2005 18:37:36 -0000
@@ -3112,12 +3112,11 @@
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
            ;;
          pgCC)
            # Portland Group 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)='-static'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)=''
            ;;
          cxx)
            # Compaq C++
@@ -3679,11 +3678,11 @@
       then
        tmp_addflag=
        case $cc_basename,$host_cpu in
-          pgcc*)                       # Portland Group C compiler
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+       pgcc*)                          # Portland Group 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; $ECHO \"$new_convenience\"` 
${wl}--no-whole-archive'
          ;;
        pgf77* | pgf90* )               # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)=
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for 
conv in $convenience\"\"; do test  -n \"$conv\" && 
new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` 
${wl}--no-whole-archive'
          tmp_addflag=' -fpic -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -5191,14 +5192,14 @@
            _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)
             # Portland Group C++ compiler
             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
             _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath 
${wl}$libdir'
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for 
conv in $convenience\"\"; do test  -n \"$conv\" && 
new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` 
${wl}--no-whole-archive'
             ;;
          cxx)
            # Compaq C++




reply via email to

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