g++: v3.4.2 OS : Solaris 8 sparc specs : see attached I am trying to compile c++ programs and shared libraries without the libstdc++.so.6 and libgcc_s.so.1 dependencies. # ldd *.so libstdc++.so.6 => /usr/local/lib/libstdc++.so.6 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 # ldd (binary) (same results as above) I have tweaked the /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/specs file before to remove the libgcc_s.so dependency by tweaking the '*libgcc' line. Now the libgcc_s.so.1 dependency for binaries compiled with 'gcc' have been removed. Any ideas? TIA, James
*asm: %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu) *asm_debug: *asm_final: *asm_options: %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O} *invoke_as: %{!S:-o %|.s | as %(asm_options) %|.s %A } *cpp: %(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget) *cpp_options: %(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} *cpp_debug_options: %{d*} *cpp_unique_options: %{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}} *trad_capable_cpp: cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp} *cc1: %{sun4:} %{target:} %{mcypress:-mcpu=cypress} %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} %{m32:%{m64:%emay not use both -m32 and -m64}} %{m64:-mptr64 -mstack-bias -mno-v8plus %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8*:%{!msupersparc:-mcpu=v9}}}}}}}} *cc1_options: %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} *cc1plus: *link_gcc_c_sequence: %G %L %G %L *endfile: %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} crtend.o%s crtn.o%s *link: %{h*} %{v:-V} %{b} %{Wl,*:%*} %{static:-dn -Bstatic} %{shared:-G -dy %{!mimpure-text:-z text}} %{symbolic:-Bsymbolic -G -dy -z text} %(link_arch) %{Qy:} %{!Qn:-Qy} *lib: %{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared: %{!symbolic: %{pthreads:-lpthread} %{!pthreads:%{threads:-lthread}} %{p|pg:-ldl} -lc}} *libgcc: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}} *startfile: %{!shared: %{!symbolic: %{p:mcrt1.o%s} %{!p: %{pg:gcrt1.o%s gmon.o%s} %{!pg:crt1.o%s}}}} crti.o%s %(startfile_arch) crtbegin.o%s *switches_need_spaces: *cross_compile: 0 *version: 3.4.2 *multilib: . !m32 !m64;sparcv7:. m32 !m64;sparcv9:sparcv9 !m32 m64; *multilib_defaults: m32 *multilib_extra: *multilib_matches: m32 m32;m64 m64; *multilib_exclusions: *multilib_options: m32/m64 *linker: collect2 *link_libgcc: %D *md_exec_prefix: /usr/ccs/bin/ *md_startfile_prefix: /usr/ccs/lib/ *md_startfile_prefix_1: *startfile_prefix_spec: *sysroot_suffix_spec: *sysroot_hdrs_suffix_spec: *cpp_cpu: %{mcypress:} %{msparclite|mf930|mf934:-D__sparclite__} %{mv8:%{!m64:-D__sparcv8}} %{msupersparc:-D__supersparc__ %{!m64:-D__sparcv8}} %{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} %{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} %{mcpu=v8:%{!m64:-D__sparcv8}} %{mcpu=supersparc:-D__supersparc__ %{!m64:-D__sparcv8}} %{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3:%{!m64:-D__sparcv8}} %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} *cpp_cpu_default: %{m64:} %{!m64:} *cpp_arch32: *cpp_arch64: -D__arch64__ -D__sparcv9 *cpp_arch_default: *cpp_arch: %{m32:%(cpp_arch32)} %{m64:%(cpp_arch64)} %{!m32:%{!m64:%(cpp_arch_default)}} *cpp_endian: %{mlittle-endian:-D__LITTLE_ENDIAN__} %{mlittle-endian-data:-D__LITTLE_ENDIAN_DATA__} *cpp_subtarget: %{pthreads:-D_REENTRANT -D_PTHREADS} %{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} *asm_cpu: %{mcpu=v9:%{!m64:-xarch=v8plus}%{m64:-xarch=v9}} %{mcpu=ultrasparc:%{!m64:-xarch=v8plusa}%{m64:-xarch=v9a}} %{mcpu=ultrasparc3:%{!m64:-xarch=v8plusb}%{m64:-xarch=v9b}} %{!mcpu=ultrasparc3:%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:%{!m64:-xarch=v8}%{m64:-xarch=v9}}}}} %{!mcpu*:%(asm_cpu_default)} *asm_cpu_default: %{m64:-xarch=v9} %{!m64:} *asm_arch32: *asm_arch64: *asm_relax: *asm_arch_default: *asm_arch: *startfile_arch: %{ansi:values-Xc.o%s} %{!ansi:values-Xa.o%s} *link_arch32: %{G:-G} %{YP,*} %{R*} %{compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} -R /usr/ucblib} %{!compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}} *link_arch64: %{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} %{G:-G} %{YP,*} %{R*} %{compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} -R /usr/ucblib/sparcv9} %{!compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}} *link_arch_default: %{G:-G} %{YP,*} %{R*} %{compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} -R /usr/ucblib} %{!compat-bsd: %{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}} *link_arch: %{m32:%(link_arch32)} %{m64:%(link_arch64)} %{!m32:%{!m64:%(link_arch_default)}} *link_command: %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %{pie:} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate:-lgcov} %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}