This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/7516] Ambiguous driver behaviour with "-shared -static" cmd line options combination



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]