6/6/2008, "Arne Steinarson" <[EMAIL PROTECTED]> napisał/a:

>The shared libraries themselves still
>have a dependency on libgcc_s.so:
>
>  $ ldd libwx_gtk2ud_fwb_core-2.9.so.0 | grep gcc
>      libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6ee8000)

you can use the -nodefaultlibs and manually add what you want.
e.g. you can link a static stlport with static gcc stuff by:

(...) -nodefaultlibs -lstlport -lpthread -lgcc_eh -lgcc -lsupc++ -lc

and get e.g.:

$ ldd libExample.so
        linux-vdso.so.1 =>  (0x00007fff775fe000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b3933a4e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b3933c53000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b3933e6e000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b39340ed000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

as you can see there're only deps to the core system libraries
and all these things related to the stl/gcc are linked in statically.

ps).
i'm using the stlport becuase libstdc++.a can't be linked
statically into shared libs -> http://gcc.gnu.org/PR28811

Reply via email to