libtool
[Top][All Lists]
Advanced

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

Re: Sun Studio: STL libraries


From: Peter O'Gorman
Subject: Re: Sun Studio: STL libraries
Date: Thu, 07 Feb 2008 16:15:57 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Tim Mooney wrote:
> In regard to: Re: Sun Studio: STL libraries, Dan Lacher said (at 1:05pm
> on...:
> 
>> Sorry, I forgot the last point: As a result, we need a way to have
>> Libtool not link in any STL library at all.  How can we do this?
> 
> Thanks for clarifying what you're trying to accomplish.
> 
> What happens if you use
> 
>     CXXFLAGS="-library=%none -library=no%libC"
> 
> Does libtool still thwart your efforts?

Seems probable. Workaround for now is to edit libtool after it is
generated, changing postdeps so it is empty.

Not sure what to do in the general case. Can either:

1) Allow the setting of a cache var to select if these are added.
(something like attached patch).

2) Only add the -library=Cstd -library=Crun etc if building with no
undefined symbols.

Toughts?

Peter
-- 
Peter O'Gorman
http://pogma.com
Index: libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.196
diff -u -r1.314.2.196 libtool.m4
--- libtool.m4  1 Feb 2008 16:58:19 -0000       1.314.2.196
+++ libtool.m4  7 Feb 2008 22:13:01 -0000
@@ -4015,15 +4015,17 @@
     # Sun C++ 5.9
     #
     # 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
-    if test "$solaris_use_stlport4" != yes; then
+    # incompatible with the Cstd library.
+    AC_CACHE_CHECK([if we need to add -library=Cstd -library=Crun],
+      [lt_cv_add_cstd_crun],[ 
+      lt_cv_add_cstd_crun=yes
+      case " $CXX $CXXFLAGS " in
+      *" -library=stlport4 "*)
+        lt_cv_add_cstd_crun=no
+        ;;
+      esac
+    ])
+    if test "$lt_cv_add_cstd_crun" != no; then
       _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
     fi
     ;;
@@ -4033,20 +4035,19 @@
 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.
-    if test "$solaris_use_stlport4" != yes; then
+    AC_CACHE_CHECK([if we need to add -library=Cstd -library=Crun],
+      [lt_cv_add_cstd_crun],[ 
+      lt_cv_add_cstd_crun=yes
+      case " $CXX $CXXFLAGS " in
+      *" -library=stlport4 "*)
+        lt_cv_add_cstd_crun=no
+        ;;
+      esac
+    ])
+    if test "$lt_cv_add_cstd_crun" != no; then
       _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
     fi
     ;;

reply via email to

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