]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix AC_NO_EXECUTABLES test failure on IRIX 6.5.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 12 Sep 2010 09:25:36 +0000 (11:25 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 12 Sep 2010 13:40:29 +0000 (15:40 +0200)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/m4/libtool.m4
tests/no-executables.at

index 4584882e92d217dab746bf6c2eb9d525016fad32..4e8557ba294f715223c65cd509029d30a429ca87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <juergen.reuter@physik.uni-freiburg.de>  (tiny change)
            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
index a9e91f63d82d40d082413b48e69ea9799fe22084..3a4e757c60fd277cc4681c99606f9d403a1a69f4 100644 (file)
@@ -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'
index 75b92efae1959958fdcb060e3e1e20165aa87d8d..bcc9cf246f7fdfbfc067e7cd0676de4f6a1a1b47 100644 (file)
@@ -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