From: Ralf Wildenhues Date: Sun, 12 Sep 2010 09:25:36 +0000 (+0200) Subject: Fix AC_NO_EXECUTABLES test failure on IRIX 6.5. X-Git-Tag: v2.4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=594b9203db9e5c3fef5729016d73e71026701f02;p=thirdparty%2Flibtool.git Fix AC_NO_EXECUTABLES test failure on IRIX 6.5. * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [irix]: Cache result of link check for -Wl,-exported_symbol. * tests/no-executables.at (AC_NO_EXECUTABLES): Set lt_cv_irix_exported_symbol, to avoid link check. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 4584882e9..4e8557ba2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-09-12 Ralf Wildenhues + + Fix AC_NO_EXECUTABLES test failure on IRIX 6.5. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [irix]: Cache result + of link check for -Wl,-exported_symbol. + * tests/no-executables.at (AC_NO_EXECUTABLES): Set + lt_cv_irix_exported_symbol, to avoid link check. + 2010-09-12 Jürgen Reuter (tiny change) Ralf Wildenhues diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index a9e91f63d..3a4e757c6 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -5189,21 +5189,27 @@ _LT_EOF # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], [ + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ]) - LDFLAGS="$save_LDFLAGS" + fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' diff --git a/tests/no-executables.at b/tests/no-executables.at index 75b92efae..bcc9cf246 100644 --- a/tests/no-executables.at +++ b/tests/no-executables.at @@ -52,6 +52,7 @@ lt_cv_cc_needs_belf=no lt_cv_ld_exported_symbols_list=no lt_cv_prog_compiler_static_works=no lt_cv_aix_libpath="/usr/lib:/lib" +lt_cv_irix_exported_symbol=yes # Deal with AC_LIBTOOL_DLOPEN in one of two possible ways: # - do not execute it at all in the ac_no_link case