Re: Solaris whole_archive_flags fixes

2006-02-03 Thread Gary V. Vaughan
Hallo Ralf!

Ralf Wildenhues wrote:
> To increase the chance of being correct this time, I have tested
> these compilers:[1].  And I have reread most threads of the last 18
> months that dealt with Solaris, to make sure there was no report
> that disproved this solution.

Sorry, I just applied your patch and tested on my old Solaris 7 x86,
with Forte, and nothing compiles at all.  I also checked back 9 years
on the mail archives, and Gord couldn't get your $Wl hack to work on
SunOS 4:

   http://lists.gnu.org/archive/html/libtool/1997-04/msg1.html

If you can't be bothered to test your patches thoroughly, then I
can't see much point in posting them! ;-)  ROFL.

> OK to apply to both branches?

I'm sorry Ralf, but I just couldn't resist.  You are diligent beyand
the call of duty!!  Yes, please apply.

> Apologies to Yuri for the huge delay, and thanks to him for both his
> patience and insistence to fix this.  :-)

Argh!  My sides... I can't take any more!  :-p :-) O:-)

> * libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
> (_LT_LANG_CXX_CONFIG) < whole_archive_flag_spec >:
> Fix this once and for all, for both the SUN compiler suite
> (cc/CC/f77/f90/f95) and GCC.
> Reported by Yuri Pukhalsky <[EMAIL PROTECTED]>.

Cheers,
Gary.
-- 
Gary V. Vaughan  ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker   / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook


signature.asc
Description: OpenPGP digital signature


Re: Solaris whole_archive_flags fixes

2006-02-03 Thread Albert Chin
On Fri, Feb 03, 2006 at 05:03:35PM +0100, Ralf Wildenhues wrote:
> We still did not have whole_archive_flag_spec right for Solaris.
> The whole issue is pretty simple to really solve though: no `$wl'
> for Solaris cc/CC/f77/f90/f95 compilers, always `-Wl,' for GCC.
> 
> To increase the chance of being correct this time, I have tested
> these compilers:[1].  And I have reread most threads of the last 18
> months that dealt with Solaris, to make sure there was no report
> that disproved this solution.
> 
> OK to apply to both branches?

I guess I should have done more testing with my original patch :)
  http://lists.gnu.org/archive/html/libtool-patches/2004-02/msg00138.html

Good work. Thanks.

-- 
albert chin ([EMAIL PROTECTED])




Re: Solaris whole_archive_flags fixes

2006-02-03 Thread Ralf Wildenhues
* Bob Friesenhahn wrote on Fri, Feb 03, 2006 at 08:55:28PM CET:
> On Fri, 3 Feb 2006, Ralf Wildenhues wrote:
> 
> >OK to apply to both branches?
> 
> You only tested with 19 variations of Solaris compiler?

I was afraid an older compiler driver needed $wl.  Precisely because it
had always been in the code.

> You didn't test with GCC 2.3.3?

Well, if libtool `archive_cmd' rules are still ok for GCC 2.3.3, then it
will also work with my `whole_archive_flag_spec' changes: that GCC
version understood `-Wl,'.

Of a free software compiler, using a version more than a dozen years old
does not make too much sense, though.  ;-)

> The patches look fine to apply to me.  I am sure it will soon become 
> clear if variant 20 of Solaris compilers is a problem

Thanks!  Applied to both branches.

Cheers,
Ralf




Re: Solaris whole_archive_flags fixes

2006-02-03 Thread Bob Friesenhahn

On Fri, 3 Feb 2006, Ralf Wildenhues wrote:


We still did not have whole_archive_flag_spec right for Solaris.
The whole issue is pretty simple to really solve though: no `$wl'
for Solaris cc/CC/f77/f90/f95 compilers, always `-Wl,' for GCC.

To increase the chance of being correct this time, I have tested
these compilers:[1].  And I have reread most threads of the last 18
months that dealt with Solaris, to make sure there was no report
that disproved this solution.

OK to apply to both branches?


You only tested with 19 variations of Solaris compiler?  You didn't 
test with GCC 2.3.3?


The patches look fine to apply to me.  I am sure it will soon become 
clear if variant 20 of Solaris compilers is a problem


Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/




Solaris whole_archive_flags fixes

2006-02-03 Thread Ralf Wildenhues
We still did not have whole_archive_flag_spec right for Solaris.
The whole issue is pretty simple to really solve though: no `$wl'
for Solaris cc/CC/f77/f90/f95 compilers, always `-Wl,' for GCC.

To increase the chance of being correct this time, I have tested
these compilers:[1].  And I have reread most threads of the last 18
months that dealt with Solaris, to make sure there was no report
that disproved this solution.

OK to apply to both branches?

Apologies to Yuri for the huge delay, and thanks to him for both his
patience and insistence to fix this.  :-)

Cheers,
Ralf

[1]
GCC-2.95
GCC-4.0.1
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-22 2005/04/29
cc: Sun C 5.5 Patch 112760-18 2005/06/14
CC: Sun C++ 5.5 Patch 113817-15 2005/10/25
cc: Sun C 5.5 Patch 112760-18 2005/06/14
CC: Sun C++ 5.5 Patch 113817-15 2005/10/25
cc: Sun C 5.6 2004/07/15
CC: Sun C++ 5.6 2004/07/15
cc: Sun C 5.7 Patch 117836-05 2005/10/05
CC: Sun C++ 5.7 Patch 117830-05 2005/12/12
cc: Sun C 5.8 2005/10/13
CC: Sun C++ 5.8 2005/10/13
f77: Sun WorkShop 6 update 2 FORTRAN 77 5.3 Patch 111691-07 2004/04/23
f90: Sun WorkShop 6 update 2 Fortran 95 6.2 Patch 111690-10 2003/08/28
f90: Sun Fortran 95 7.1 Patch 112762-16 2005/10/25
f90: Sun Fortran 95 8.0 2004/07/15
f90: Sun Fortran 95 8.1 Patch 117834-03 2005/06/15

* libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
(_LT_LANG_CXX_CONFIG) < whole_archive_flag_spec >:
Fix this once and for all, for both the SUN compiler suite
(cc/CC/f77/f90/f95) and GCC.
Reported by Yuri Pukhalsky <[EMAIL PROTECTED]>.
* libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
(_LT_LANG_CXX_CONFIG) < whole_archive_flag_spec >:
Fix this once and for all, for both the SUN compiler suite
(cc/CC/f77/f90/f95) and GCC.
Reported by Yuri Pukhalsky <[EMAIL PROTECTED]>.

Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.58
diff -u -r1.58 libtool.m4
--- libltdl/m4/libtool.m4   21 Jan 2006 16:44:41 -  1.58
+++ libltdl/m4/libtool.m4   3 Feb 2006 13:42:11 -
@@ -4714,17 +4714,16 @@
   case $host_os in
   solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
   *)
-   # The compiler driver will combine linker options so we
-   # cannot just pass the convenience library names through
-   # without $wl, iff we do not link with $LD.
-   # Luckily, gcc supports the same syntax we need for Sun Studio.
+   # The compiler driver will combine and reorder linker options,
+   # but understands `-z linker_flag'.  GCC discards it without `$wl',
+   # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
-   case $wlarc in
-   '')
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z 
defaultextract' ;;
-   *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for 
conv in $convenience\"\"; do test -n \"$conv\" && 
new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` 
${wl}-z ${wl}defaultextract' ;;
-   esac ;;
+   if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z 
${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+   else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z 
defaultextract'
+   fi
+   ;;
   esac
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   ;;
@@ -5936,15 +5935,10 @@
case $host_os in
  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  *)
-   # The C++ compiler is used as linker so we must use $wl
-   # flag to pass the commands to the underlying system
-   # linker. We must also pass each convenience library through
-   # to the system linker between allextract/defaultextract.
-   # The C++ compiler will combine linker options so we
-   # cannot just pass the convenience library names through
-   # without $wl.
+   # The compiler driver will combine and reorder linker options,
+   # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
-   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z 
${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && 
new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` 
${wl}-z ${wl}defaultextract'
+   _LT_TAGVAR(whole_archive_flag_spec, $1)='-z 
allextract$convenience -z defaultextract'
;;
esac
_LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5991,6 +5985,12 @@
  fi
 
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+