Hi, Here is a patch that adds support for Sun's C and C++ compilers 5.9, ported from Solaris to Linux. They exist for x86 and x86_64; I tested it only on x86. The compiler executable for C is called 'c89' and 'c99' (two slightly different programs); for C++ it is called 'CC'.
Without this patch, several tests fail: PASS: cdemo-static.test PASS: cdemo-make.test PASS: cdemo-exec.test PASS: demo-static.test FAIL: demo-make.test FAIL: demo-exec.test FAIL: demo-inst.test PASS: demo-unst.test PASS: depdemo-static.test PASS: depdemo-make.test PASS: depdemo-exec.test PASS: depdemo-inst.test PASS: depdemo-unst.test PASS: mdemo-static.test FAIL: mdemo-make.test SKIP: mdemo-exec.test SKIP: mdemo-inst.test PASS: mdemo-unst.test SKIP: cdemo-conf.test SKIP: cdemo-make.test SKIP: cdemo-exec.test SKIP: demo-conf.test SKIP: demo-make.test SKIP: demo-exec.test SKIP: demo-inst.test SKIP: demo-unst.test SKIP: deplibs.test SKIP: depdemo-conf.test SKIP: depdemo-make.test SKIP: depdemo-exec.test SKIP: depdemo-inst.test SKIP: depdemo-unst.test SKIP: mdemo-conf.test SKIP: mdemo-make.test SKIP: mdemo-exec.test SKIP: mdemo-inst.test SKIP: mdemo-unst.test SKIP: dryrun.test PASS: demo-nofast.test FAIL: demo-make.test FAIL: demo-exec.test FAIL: demo-inst.test PASS: demo-unst.test PASS: demo-pic.test FAIL: demo-make.test FAIL: demo-exec.test PASS: demo-nopic.test FAIL: demo-make.test FAIL: demo-exec.test PASS: depdemo-nofast.test PASS: depdemo-make.test PASS: depdemo-exec.test PASS: depdemo-inst.test PASS: depdemo-unst.test SKIP: cdemo-shared.test SKIP: cdemo-make.test SKIP: cdemo-exec.test SKIP: demo-shared.test SKIP: demo-make.test SKIP: demo-exec.test SKIP: demo-inst.test SKIP: hardcode.test SKIP: build-relink.test SKIP: noinst-link.test SKIP: demo-unst.test SKIP: depdemo-shared.test SKIP: depdemo-make.test SKIP: depdemo-exec.test SKIP: depdemo-inst.test SKIP: build-relink2.test SKIP: depdemo-unst.test SKIP: mdemo-shared.test SKIP: mdemo-make.test SKIP: mdemo-exec.test SKIP: mdemo-inst.test SKIP: mdemo-unst.test PASS: assign.test PASS: link.test PASS: link-2.test PASS: nomode.test PASS: quote.test PASS: sh.test PASS: suffix.test SKIP: pdemo-conf.test SKIP: pdemo-make.test SKIP: pdemo-exec.test SKIP: pdemo-inst.test SKIP: mdemo-conf.test SKIP: mdemo-make.test SKIP: mdemo2-conf.test SKIP: mdemo2-make.test SKIP: mdemo2-exec.test PASS: duplicate_members.test PASS: link-order.test PASS: tagdemo-static.test PASS: tagdemo-make.test PASS: tagdemo-exec.test SKIP: tagdemo-conf.test SKIP: tagdemo-make.test SKIP: tagdemo-exec.test SKIP: tagdemo-shared.test SKIP: tagdemo-make.test SKIP: tagdemo-exec.test PASS: f77demo-static.test PASS: f77demo-make.test PASS: f77demo-exec.test SKIP: f77demo-conf.test SKIP: f77demo-make.test SKIP: f77demo-exec.test SKIP: f77demo-shared.test SKIP: f77demo-make.test SKIP: f77demo-exec.test With this patch, the FAILs are turned into PASS; all tests PASS or SKIP. Additionally, with the corresponding patch to config.rpath, the autoconf-lib-link testsuite passes as well. 2006-05-05 Bruno Haible <[EMAIL PROTECTED]> * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): Add support for Sun C++ 5.9 on Linux. (AC_LIBTOOL_PROG_COMPILER_PIC): Add support for Sun C 5.9 and Sun C++ 5.9. (AC_LIBTOOL_PROG_LD_SHLIBS): Add support for Sun C 5.9. *** libtool-1.5.22/libtool.m4.bak 2005-12-18 22:53:17.000000000 +0100 --- libtool-1.5.22/libtool.m4 2006-05-07 02:17:19.000000000 +0200 *************** *** 3353,3358 **** --- 3353,3377 ---- # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + CC*) + # Sun C++ 5,9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; esac ;; lynxos*) *************** *** 4990,4995 **** --- 5009,5020 ---- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + CC*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *) ;; esac *************** *** 5237,5242 **** --- 5262,5273 ---- # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + c89* | c99*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; esac ;; *************** *** 5547,5559 **** ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ ! $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no --- 5578,5596 ---- ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac ! case $cc_basename in ! c89* | c99*) # Sun C 5.9 ! tmp_sharedflag='-G' ;; ! *) ! tmp_sharedflag='-shared' ;; ! esac ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ ! $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool