Index: ChangeLog from Alexandre Oliva * ltcf-cxx.sh (whole_archive_flag_spec): Use -z allextract on Solaris 2.6 and above, with GCC and non-GNU ld. Index: ltcf-cxx.sh =================================================================== RCS file: /cvs/gcc/gcc/ltcf-cxx.sh,v retrieving revision 1.25 diff -u -p -r1.25 ltcf-cxx.sh --- ltcf-cxx.sh 20 Feb 2003 01:11:51 -0000 1.25 +++ ltcf-cxx.sh 23 Apr 2003 18:21:14 -0000 @@ -612,6 +612,16 @@ case $host_os in # GNU C++ compiler with Solaris linker if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then no_undefined_flag=' ${wl}-z ${wl}defs' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac if $CC --version | egrep -v '^2\.7' > /dev/null; then archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~