[Top][All Lists]

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

Re: postdeps empty on OpenBSD

From: Olly Betts
Subject: Re: postdeps empty on OpenBSD
Date: Wed, 21 Sep 2005 15:16:43 +0000 (UTC)
User-agent: slrn/ (Linux)

On 2005-09-21, Peter O'Gorman <address@hidden> wrote:
> IIRC, archive_cmds on openbsd does not use -nostdlib, so having empty
> postdeps ought to be okay.

It looks like the problem is that "g++ -shared" doesn't link to libstdc++.
Here's the output from my original message (except wrapped for your viewing

  g++ -shared -v /dev/null 2>&1|grep "\-L"


  On an x86 OpenBSD 3.7 box with g++ 3.3.5 this gives:

   /usr/lib/gcc-lib/i386-unknown-openbsd3.7/3.3.5/collect2 --eh-frame-hdr
     -shared -Bdynamic -dynamic-linker /usr/libexec/ /usr/lib/crtbeginS.o
     -L/usr/lib/gcc-lib/i386-unknown-openbsd3.7/3.3.5 /dev/null -lsupc++ -lgcc
     -lgcc /usr/lib/crtendS.o

  Note: -lsupc++ instead of -lstdc++.

Without the -shared, the output *does* contain -lstdc++.

So using "g++ -shared" to do the link means my module doesn't depend on
libstdc++.  With dlopen from a C++ program that would be OK, as the program
would pull in libstdc++, but dlopen from a C program fails.


reply via email to

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