Re: Support -library=stlport4 with Sun C++ compiler

2006-08-03 Thread Ralf Menzel
Hi,

Albert Chin [EMAIL PROTECTED] writes:
 Good catch. Updated patch attached.

 2006-08-01  Albert Chin [EMAIL PROTECTED]

   * libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
   Don't set $postdeps to -lCstd -lCrun if
   -library=stlport4 set in CXXFLAGS as stlport4 C++
   library incompatible with Cstd C++ library. Use
   '-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

 2006-08-01  Albert Chin [EMAIL PROTECTED]

   * libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
   Don't set $postdeps to -lCstd -lCrun if
   -library=stlport4 set in CXXFLAGS as stlport4 C++
   library incompatible with Cstd C++ library. Use
   '-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

I found some problems with the patches:

1. In the patch for libtool-HEAD the 'for ... do' line is superflous.

2. _LT_AC_TAGVAR doesn't seem to work with libtool-HEAD. I used
   _LT_TAGVAR, which seems to work.

3. In libtool-HEAD the patch addresses the Sun C compiler for Linux
   and not for Solaris, while the patch for libtool-1-5 addresses the
   Solaris compiler and ignores the linux version.

The following patches seem to work for me:



libtool-1-5-patch
Description: Patch for libtool-1-5


libtool-HEAD-patch
Description: Patch for libtool-HEAD


Re: Support -library=stlport4 with Sun C++ compiler

2006-08-03 Thread Peter O'Gorman


On Aug 3, 2006, at 9:50 PM, Ralf Menzel wrote:


Hi,

Albert Chin [EMAIL PROTECTED] writes:

Good catch. Updated patch attached.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.


I found some problems with the patches:

1. In the patch for libtool-HEAD the 'for ... do' line is superflous.

2. _LT_AC_TAGVAR doesn't seem to work with libtool-HEAD. I used
   _LT_TAGVAR, which seems to work.

3. In libtool-HEAD the patch addresses the Sun C compiler for Linux
   and not for Solaris, while the patch for libtool-1-5 addresses the
   Solaris compiler and ignores the linux version.

The following patches seem to work for me:

libtool-1-5-patch
libtool-HEAD-patch


Inadequate review. Thanks for pointing it out.

Sorry,
Peter





Re: Support -library=stlport4 with Sun C++ compiler

2006-08-03 Thread Albert Chin
On Thu, Aug 03, 2006 at 02:50:31PM +0200, Ralf Menzel wrote:
 Albert Chin [EMAIL PROTECTED] writes:
  Good catch. Updated patch attached.
 
  2006-08-01  Albert Chin [EMAIL PROTECTED]
 
  * libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
  Don't set $postdeps to -lCstd -lCrun if
  -library=stlport4 set in CXXFLAGS as stlport4 C++
  library incompatible with Cstd C++ library. Use
  '-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.
 
  2006-08-01  Albert Chin [EMAIL PROTECTED]
 
  * libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
  Don't set $postdeps to -lCstd -lCrun if
  -library=stlport4 set in CXXFLAGS as stlport4 C++
  library incompatible with Cstd C++ library. Use
  '-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.
 
 I found some problems with the patches:
 
 1. In the patch for libtool-HEAD the 'for ... do' line is superflous.
 
 2. _LT_AC_TAGVAR doesn't seem to work with libtool-HEAD. I used
_LT_TAGVAR, which seems to work.
 
 3. In libtool-HEAD the patch addresses the Sun C compiler for Linux
and not for Solaris, while the patch for libtool-1-5 addresses the
Solaris compiler and ignores the linux version.
 
 The following patches seem to work for me:

Good catch. I should have tested the new patches! Updated patches
attached.

2006-08-03  Albert Chin [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ linux,
solaris ]: Remove unterminated for loop from last patch;
change variable name from $solaris_use_stlport4 to
$suncpp_use_stlport4 as Sun C++ on GNU/Linux might need
this feature as well; add -library=stlport4 to solaris
section as well.

2006-08-03  Albert Chin [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ linux,
solaris ]: Change variable name from $solaris_use_stlport4
to $suncpp_use_stlport4 as Sun C++ on GNU/Linux might need
this feature as well; add -library=stlport4 to linux section
as well.

-- 
albert chin ([EMAIL PROTECTED])
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.161
diff -u -p -r1.314.2.161 libtool.m4
--- libtool.m4  2 Aug 2006 13:35:37 -   1.314.2.161
+++ libtool.m4  3 Aug 2006 13:45:30 -
@@ -3913,7 +3920,23 @@ linux*)
   case `$CC -V 21 | sed 5q` in
   *Sun\ C*)
 # Sun C++ 5.9
-_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+
+# The more standards-conforming stlport4 library is
+# incompatible with the Cstd library. Avoid specifying
+# it if it's in CXXFLAGS. Ignore libCrun as
+# -library=stlport4 depends on it.
+case  $CXX $CXXFLAGS  in
+* -library=stlport4 *)
+  suncpp_use_stlport4=yes
+  ;;
+esac
+
+# Adding this requires a known-good setup of shared libraries for
+# Sun compiler versions before 5.6, else PIC objects from an old
+# archive will be linked into the output, leading to subtle bugs.
+if test $suncpp_use_stlport4 != yes; then
+  _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+fi
 ;;
   esac
   ;;
@@ -3927,14 +3950,14 @@ solaris*)
 # -library=stlport4 depends on it.
 case  $CXX $CXXFLAGS  in
 * -library=stlport4 *)
-  solaris_use_stlport4=yes
+  suncpp_use_stlport4=yes
   ;;
 esac
 
 # Adding this requires a known-good setup of shared libraries for
 # Sun compiler versions before 5.6, else PIC objects from an old
 # archive will be linked into the output, leading to subtle bugs.
-if test $solaris_use_stlport4 != yes; then
+if test $suncpp_use_stlport4 != yes; then
   _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 fi
 ;;
Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.77
diff -u -p -r1.77 libtool.m4
--- libltdl/m4/libtool.m4   2 Aug 2006 13:35:30 -   1.77
+++ libltdl/m4/libtool.m4   3 Aug 2006 13:45:41 -
@@ -6343,15 +6343,14 @@ linux*)
 # incompatible with the Cstd library. Avoid specifying
 # it if it's in CXXFLAGS. Ignore libCrun as
 # -library=stlport4 depends on it.
-for cc_flag in $CXXFLAGS; do
 case  $CXX $CXXFLAGS  in
 * -library=stlport4 *)
-  solaris_use_stlport4=yes
+  suncpp_use_stlport4=yes
   ;;
 esac
 
-if test $solaris_use_stlport4 != yes; then
-  _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+if test $suncpp_use_stlport4 != yes; then
+  _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 fi
 ;;
   esac
@@ -6363,7 +6362,20 @@ solaris*)
 # Adding this requires a known-good setup of shared libraries for
 # Sun compiler versions before 5.6, else PIC objects from an old
 # archive will be linked into the output, leading to subtle bugs.
- 

Re: Support -library=stlport4 with Sun C++ compiler

2006-08-03 Thread Peter O'Gorman


On Aug 3, 2006, at 11:29 PM, Albert Chin wrote:


On Thu, Aug 03, 2006 at 02:50:31PM +0200, Ralf Menzel wrote:

Albert Chin [EMAIL PROTECTED] writes:

Good catch. Updated patch attached.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.


I found some problems with the patches:

1. In the patch for libtool-HEAD the 'for ... do' line is superflous.

2. _LT_AC_TAGVAR doesn't seem to work with libtool-HEAD. I used
   _LT_TAGVAR, which seems to work.

3. In libtool-HEAD the patch addresses the Sun C compiler for Linux
   and not for Solaris, while the patch for libtool-1-5 addresses the
   Solaris compiler and ignores the linux version.

The following patches seem to work for me:


Good catch. I should have tested the new patches! Updated patches
attached.



I just applied Ralf's patches, then saw this. It's okay with me as  
is, do you insist on the variable name change? I can see the value,  
but am tired of applying patches for this :)


Peter




Re: Support -library=stlport4 with Sun C++ compiler

2006-08-03 Thread Albert Chin
On Thu, Aug 03, 2006 at 11:44:17PM +0900, Peter O'Gorman wrote:
 
 I just applied Ralf's patches, then saw this. It's okay with me as  
 is, do you insist on the variable name change? I can see the value,  
 but am tired of applying patches for this :)

No, I don't insist. As long as it works.

-- 
albert chin ([EMAIL PROTECTED])




Re: Support -library=stlport4 with Sun C++ compiler

2006-08-02 Thread Peter O'Gorman


On Aug 2, 2006, at 2:00 AM, Albert Chin wrote:


2006-08-01  Albert Chin [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.


Applied.

Thanks,
Peter




Re: Support -library=stlport4 with Sun C++ compiler

2006-08-01 Thread Albert Chin
On Tue, Aug 01, 2006 at 02:12:31PM +0900, Peter O'Gorman wrote:
 
 On Aug 1, 2006, at 1:38 PM, Albert Chin wrote:
 
 Sun C++ supports two C++ libraries, -library=Cstd (default), and the
 newer -library=stlport4. They are incompatible. Therefore, libtool's
 use of -lCstd (equivalent to -library=Cstd) should not be assigned to
 $postdeps if -library=stlport4 is in CXXFLAGS. Patch attached.
 
 Patch against branch-1-5 and branch-2.0 attached.
 
 This makes sense, but branch-2-0 is dead :-)
 
 Before I apply it though, do we also want to check CXX for - 
 library=stlport4 ? Someone could do CXX='CC -library=stlport4' and  
 expect libtool not to add CStd etc. Can't we do
 
 case $CXX $CXXFLAGS  in
* -library=stlport4 *) solaris_use_stlport4=yes ;;
 esac
 
 To save the loop too?

Good catch. Updated patch attached.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_POSTDEP_PREDEP) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

2006-08-01  Albert Chin [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS) [ solaris ]:
Don't set $postdeps to -lCstd -lCrun if
-library=stlport4 set in CXXFLAGS as stlport4 C++
library incompatible with Cstd C++ library. Use
'-library=Cstd -library=Crun' instead of '-lCstd -lCrun'.

-- 
albert chin ([EMAIL PROTECTED])
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.160
diff -u -p -r1.314.2.160 libtool.m4
--- libtool.m4  28 Jul 2006 16:57:36 -  1.314.2.160
+++ libtool.m4  1 Aug 2006 16:57:51 -
@@ -3921,10 +3928,22 @@ linux*)
 solaris*)
   case $cc_basename in
   CC*)
+# The more standards-conforming stlport4 library is
+# incompatible with the Cstd library. Avoid specifying
+# it if it's in CXXFLAGS. Ignore libCrun as
+# -library=stlport4 depends on it.
+case  $CXX $CXXFLAGS  in
+* -library=stlport4 *)
+  solaris_use_stlport4=yes
+  ;;
+esac
+
 # Adding this requires a known-good setup of shared libraries for
 # Sun compiler versions before 5.6, else PIC objects from an old
 # archive will be linked into the output, leading to subtle bugs.
-_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+if test $solaris_use_stlport4 != yes; then
+  _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+fi
 ;;
   esac
   ;;
Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.76
diff -u -p -r1.76 libtool.m4
--- libltdl/m4/libtool.m4   28 Jul 2006 17:01:05 -  1.76
+++ libltdl/m4/libtool.m4   1 Aug 2006 16:58:11 -
@@ -6338,7 +6338,21 @@ linux*)
   case `$CC -V 21 | sed 5q` in
   *Sun\ C*)
 # Sun C++ 5.9
-_LT_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+
+# The more standards-conforming stlport4 library is
+# incompatible with the Cstd library. Avoid specifying
+# it if it's in CXXFLAGS. Ignore libCrun as
+# -library=stlport4 depends on it.
+for cc_flag in $CXXFLAGS; do
+case  $CXX $CXXFLAGS  in
+* -library=stlport4 *)
+  solaris_use_stlport4=yes
+  ;;
+esac
+
+if test $solaris_use_stlport4 != yes; then
+  _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+fi
 ;;
   esac
   ;;


Re: Support -library=stlport4 with Sun C++ compiler

2006-07-31 Thread Peter O'Gorman


On Aug 1, 2006, at 1:38 PM, Albert Chin wrote:


Sun C++ supports two C++ libraries, -library=Cstd (default), and the
newer -library=stlport4. They are incompatible. Therefore, libtool's
use of -lCstd (equivalent to -library=Cstd) should not be assigned to
$postdeps if -library=stlport4 is in CXXFLAGS. Patch attached.

Patch against branch-1-5 and branch-2.0 attached.


This makes sense, but branch-2-0 is dead :-)

Before I apply it though, do we also want to check CXX for - 
library=stlport4 ? Someone could do CXX='CC -library=stlport4' and  
expect libtool not to add CStd etc. Can't we do


case $CXX $CXXFLAGS  in
   * -library=stlport4 *) solaris_use_stlport4=yes ;;
esac

To save the loop too?

Peter