[libtool] Top-level libtool.m4 patch for autoconf 2.68

Message ID 293a8b7d-9629-4a5c-a41f-955d421fb41b@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey Aug. 20, 2013, 6:12 p.m.
Some of the binutils directories (libgloss and newlib) have moved from
autoconf 2.64 to 2.68.  While running autoconf 2.68 on these directories
I get some warnings coming from libtool.m4 which is at the top level
of the GCC and binutils trees.  Fixes for these warnings are already in
the upstream libtool sources and the changes work fine with autoconf 2.64
as well as autoconf 2.68 so I would like to put these fixes into the
libtool.m4 at the GCC and binutils top-levels.

I ran autoconf in various GCC and binutils directories to verify that no
signficant changes ocurred in any directories, is this patch OK to check
in to the GCC tree?  I will send seperate email to the binutils mailing
list though perhaps permission to check it in to the GCC tree is sufficient
to put it in binutils as well?

Steve Ellcey

2013-08-20  Steve Ellcey  <sellcey@mips.com>

	call in brackets.
	(irix*|nonstopux*): use AC_LANG_SOURCE in AC_LINK_IFELSE call.


diff --git a/libtool.m4 b/libtool.m4
index 8a14e2b..7119b35 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1079,7 +1079,7 @@  m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # to the aix ld manual.
     /Import File Strings/,/^$/ {
 	/^0/ {
@@ -4926,7 +4926,16 @@  _LT_EOF
 	# implicitly export all symbols.
         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
+	     [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_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'