1--- confdb/libtool.m4 2018-10-26 14:37:44.332395000 +0000 2+++ /home/yguo/libtool_new.m4 2018-10-25 22:55:38.108314000 +0000 3@@ -5242,16 +5242,27 @@ 4 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5 ;; 6 xlf* | bgf* | bgxlf* | mpixlf*) 7- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 9- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 11- if test yes = "$supports_anon_versioning"; then 12- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 13- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 14- echo "local: *; };" >> $output_objdir/$libname.ver~ 15- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 16- fi 17+ XLF_VERSION=$($CC -qversion 2>/dev/null | sed 1q | sed -e "s+^.*V++" | sed -e "s+\..*++") 18+ if test $XLF_VERSION -ge 13; then 19+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 20+ if test yes = "$supports_anon_versioning"; then 21+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 22+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 23+ echo "local: *; };" >> $output_objdir/$libname.ver~ 24+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 25+ fi 26+ else 27+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 28+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 29+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 30+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 31+ if test yes = "$supports_anon_versioning"; then 32+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 33+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 34+ echo "local: *; };" >> $output_objdir/$libname.ver~ 35+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 36+ fi 37+ fi 38 ;; 39 esac 40 else 41