On Apr 12, 2000, Ossama Othman <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 12, 2000 at 07:54:47PM -0400, Kevin Atkinson wrote:
>> On 11 Apr 2000, Alexandre Oliva wrote:
>> > On Apr 10, 2000, Kevin Atkinson <[EMAIL PROTECTED]> wrote:
>> > > 1) On many platforms libtool can create shared libraries for C but
>> > > not for C++
>> >
>> > When libtool finds that a shared library depends on a library for
>> > which no shared version is available, it decides not to create a
>> > static library.
^^^^^^ Oops, I meant `shared' here.
>> > Libtool should detect whether libstdc++ is available as a shared
>> > library or not, and arrange for it to be dropped from the link command
>> > in case the shared version is not available, and non-PIC code can't go
>> > into shared libraries.
>> Yes this would be great. How difficult would it be to implement and how
>> soon do you think it will happen. It would make my life a lot easier.
> This doesn't seem too hard to implement.
Yep. As to when it will happen, but I'm pretty sure it will be when
someone contributes the code :-)
> Alexandre, this feature wouldn't necessarily be specific to the
> multi-language branch, right?
I think it would be easier to put it in there, because that's the only
branch in which libtool analyses the options GCC/g++ uses to call the
linker. It wouldn't even know about libstdc++ in any other case.
>> > > 2) Is there a way to force libtool NOT to link in libstdc++ but STILL link
>> > > it using c++?
>> >
>> > No, but this can (and should) be improved.
>>
>> Actually Ossama Othman told me that using -nostdlib should work.... At
>> least for gcc....
-nostdlib comes with its own bag of problems. IIRC, -nostdlib will
also drop start-files, which means that you'd also get rid of global
initializers and other nice stuff. `-nodefaultlibs -lgcc -lc' would
be far better, but -nodefaultlibs only works in recent releases of
GCC.
> Presumably if libtool was configured with the "-nostdlib" flag passed
> to g++, then libtool won't have any knowledge of libstdc++ at link
> time. I think that Alexandre may have been referring to a way of
> accomplishing the same thing at libtool link time without the
> workaround I described. Alexandre?
Precisely.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me