>>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
I tried inserting this into my make command (see below). Still I get libgcc_s.so dependency (after rebuiling whole project). We really have this situation: EXE links to (lib_wx_base.so and lib_wx_net.so) lib_wx_net.so links to lib_wx_base.so lib_wx_base.so does _not_ depend on libgcc_s.so lib_wx_net.so does depend on libgcc_s.so For some reason, when linking one shared library to another one, it seems GCC throws in this dependency (contradictory to compiler options). It doesn't understand that both of the shared libraries are built against static libgcc. Maybe I'll have to build the app 100% static... Regards // ATS. Linker command: g++ -shared -fPIC -o /usr/src/wxSVN/wxWidgets/build-fwb-debug/lib/libwx_baseud_fwb_net-2.9.so.0.0.0 netdll_fs_inet.o netdll_ftp.o netdll_http.o netdll_protocol.o netdll_sckaddr.o netdll_sckfile.o netdll_sckipc.o netdll_sckstrm.o netdll_socket.o netdll_url.o netdll_gsocket.o -L/usr/src/wxSVN/wxWidgets/build-fwb-debug/lib -nodefaultlibs -static-libgcc -lpthread -lgcc_eh -lgcc -lsupc++ -lc -L/usr/src/wxSVN/wxWidgets/build-fwb-debug/lib -Wl,-soname,libwx_baseud_fwb_net-2.9.so.0 -lz -ldl -lm -lwxregexud_fwb-2.9 -pthread -Wl,--version-script,/usr/src/wxSVN/wxWidgets/build-fwb-debug/version-script -lz -ldl -lm -lwx_baseud_fwb-2.9