Subject: Re: bug#9535: sunpro and -library=stdcxx4

From: Peter O'Gorman <[email-masked]>
Date: Mon, 03 Oct 2011 12:56:52 -0500

On 09/17/2011 05:19 AM, Marc Glisse wrote:
> Hello,
>
> there was a commit in 2006 to support the sunpro option -library=stlport4:
>
> 2006-08-01 Albert Chin <[email-masked]>
>
> * 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'.
>
>
> This compiler now also supports one more alternative (solaris-only):
> -library=stdcxx4
> I assume it should receive the same treatment as -library=stlport4 ?
>

Is this all that's required?

Peter
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 0de7f3c..3b17b8f 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -7116,11 +7116,11 @@ solaris*)
     # 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 "*)
+    *" -library=stlport4 "*|*" -library=stdcxx4 "*)
       solaris_use_stlport4=yes
       ;;
     esac
 
     # Adding this requires a known-good setup of shared libraries for