libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix AC_NO_EXECUTABLES test failure on IRIX 6.5.


From: Ralf Wildenhues
Subject: Fix AC_NO_EXECUTABLES test failure on IRIX 6.5.
Date: Sun, 12 Sep 2010 15:46:24 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

I'm pushing this bugfix to fix this failure on IRIX with GCC
(log already expired; Simon bumped the timeout to 24 days now):

../../libtool/tests/no-executables.at:75: : ${CONFIG_SHELL=/bin/sh}; export CONF
IG_SHELL;         $CONFIG_SHELL ./configure $configure_options 
stderr:
configure: WARNING: using cross tools not prefixed with host triplet
configure: error: link tests are not allowed after AC_NO_EXECUTABLES
stdout:
checking for gcc... /opt/fsw/gcc42/bin/gcc
checking whether we are cross compiling... yes
[...]
checking if /opt/fsw/gcc42/bin/gcc supports -c -o file.o... (cached) yes
checking whether the /opt/fsw/gcc42/bin/gcc linker (/bin/ld -n32 -n32) supports 
shared libraries... ../../libtool/tests/no-executables.at:75: exit code was 1, e
xpected 0
105. no-executables.at:25: 105. AC_NO_EXECUTABLES (no-executables.at:25): FAILED
 (no-executables.at:75)

The patch introduces some intermixing of configure output, but that's
already there on some other hosts, less critical to fix

Cheers,
Ralf

    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.

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 895f28d..bbe8c82 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -5183,21 +5183,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 75b92ef..bcc9cf2 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]