This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/7516] Ambiguous driver behaviour with "-shared -static" cmd line options combination
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2006 13:21:27 -0000
- Subject: [Bug driver/7516] Ambiguous driver behaviour with "-shared -static" cmd line options combination
- References: <bug-7516-3224@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pluto at agmk dot net 2006-05-04 13:21 -------
(In reply to comment #0)
> $ ldd ./libfoo.so
> /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40003000)
> libc.so.6 => /lib/i686/libc.so.6 (0x40015000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
>
> *** This is not what expected! ***
i'm using a little workaround:
gcc libfoo.c -o libfoo.so -shared -fPIC \
-nodefaultlibs -Wl,-Bstatic -lc -lgcc -lgcc_eh -lc
$ ldd libfoo.so
statically linked
$ file libfoo.so
libfoo.so: ELF 64-bit LSB shared object, AMD x86-64,
version 1 (SYSV), not stripped
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7516