public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] newlib: switch to AM_PROG_AR
Date: Wed,  9 Feb 2022 03:17:54 +0000 (GMT)	[thread overview]
Message-ID: <20220209031754.6CE9A3858D28@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e7ad3f5aa88d262d86beda22ebb8a9202f776a26

commit e7ad3f5aa88d262d86beda22ebb8a9202f776a26
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Jan 29 02:41:03 2022 -0500

    newlib: switch to AM_PROG_AR
    
    Now that we require automake-1.15, we can use this macro rather than
    do the tool search ourselves.

Diff:
---
 newlib/Makefile.in                                 |   1 +
 newlib/acinclude.m4                                |   2 +-
 newlib/aclocal.m4                                  |  60 +++++
 newlib/configure                                   | 270 +++++++++++++--------
 newlib/libc/Makefile.in                            |   1 +
 newlib/libc/aclocal.m4                             |  60 +++++
 newlib/libc/argz/Makefile.in                       |   1 +
 newlib/libc/configure                              | 270 +++++++++++++--------
 newlib/libc/ctype/Makefile.in                      |   1 +
 newlib/libc/errno/Makefile.in                      |   1 +
 newlib/libc/iconv/Makefile.in                      |   1 +
 newlib/libc/iconv/ccs/Makefile.in                  |   1 +
 newlib/libc/iconv/ccs/binary/Makefile.in           |   1 +
 newlib/libc/iconv/ces/Makefile.in                  |   1 +
 newlib/libc/iconv/lib/Makefile.in                  |   1 +
 newlib/libc/locale/Makefile.in                     |   1 +
 newlib/libc/machine/a29k/Makefile.in               |   1 +
 newlib/libc/machine/aarch64/Makefile.in            |   1 +
 newlib/libc/machine/amdgcn/Makefile.in             |   1 +
 newlib/libc/machine/arc/Makefile.in                |   1 +
 newlib/libc/machine/arm/Makefile.in                |   1 +
 newlib/libc/machine/bfin/Makefile.in               |   1 +
 newlib/libc/machine/cr16/Makefile.in               |   1 +
 newlib/libc/machine/cris/Makefile.in               |   1 +
 newlib/libc/machine/crx/Makefile.in                |   1 +
 newlib/libc/machine/csky/Makefile.in               |   1 +
 newlib/libc/machine/d10v/Makefile.in               |   1 +
 newlib/libc/machine/d30v/Makefile.in               |   1 +
 newlib/libc/machine/epiphany/Makefile.in           |   1 +
 newlib/libc/machine/fr30/Makefile.in               |   1 +
 newlib/libc/machine/frv/Makefile.in                |   1 +
 newlib/libc/machine/ft32/Makefile.in               |   1 +
 newlib/libc/machine/h8300/Makefile.in              |   1 +
 newlib/libc/machine/h8500/Makefile.in              |   1 +
 newlib/libc/machine/hppa/Makefile.in               |   1 +
 newlib/libc/machine/i386/Makefile.in               |   1 +
 newlib/libc/machine/i960/Makefile.in               |   1 +
 newlib/libc/machine/iq2000/Makefile.in             |   1 +
 newlib/libc/machine/lm32/Makefile.in               |   1 +
 newlib/libc/machine/m32c/Makefile.in               |   1 +
 newlib/libc/machine/m32r/Makefile.in               |   1 +
 newlib/libc/machine/m68hc11/Makefile.in            |   1 +
 newlib/libc/machine/m68k/Makefile.in               |   1 +
 newlib/libc/machine/m88k/Makefile.in               |   1 +
 newlib/libc/machine/mep/Makefile.in                |   1 +
 newlib/libc/machine/microblaze/Makefile.in         |   1 +
 newlib/libc/machine/mips/Makefile.in               |   1 +
 newlib/libc/machine/mn10200/Makefile.in            |   1 +
 newlib/libc/machine/mn10300/Makefile.in            |   1 +
 newlib/libc/machine/moxie/Makefile.in              |   1 +
 newlib/libc/machine/msp430/Makefile.in             |   1 +
 newlib/libc/machine/mt/Makefile.in                 |   1 +
 newlib/libc/machine/nds32/Makefile.in              |   1 +
 newlib/libc/machine/necv70/Makefile.in             |   1 +
 newlib/libc/machine/nios2/Makefile.in              |   1 +
 newlib/libc/machine/nvptx/Makefile.in              |   1 +
 newlib/libc/machine/or1k/Makefile.in               |   1 +
 newlib/libc/machine/powerpc/Makefile.in            |   1 +
 newlib/libc/machine/pru/Makefile.in                |   1 +
 newlib/libc/machine/riscv/Makefile.in              |   1 +
 newlib/libc/machine/rl78/Makefile.in               |   1 +
 newlib/libc/machine/rx/Makefile.in                 |   1 +
 newlib/libc/machine/sh/Makefile.in                 |   1 +
 newlib/libc/machine/sparc/Makefile.in              |   1 +
 newlib/libc/machine/spu/Makefile.in                |   1 +
 newlib/libc/machine/tic4x/Makefile.in              |   1 +
 newlib/libc/machine/tic6x/Makefile.in              |   1 +
 newlib/libc/machine/tic80/Makefile.in              |   1 +
 newlib/libc/machine/v850/Makefile.in               |   1 +
 newlib/libc/machine/visium/Makefile.in             |   1 +
 newlib/libc/machine/w65/Makefile.in                |   1 +
 newlib/libc/machine/x86_64/Makefile.in             |   1 +
 newlib/libc/machine/xc16x/Makefile.in              |   1 +
 newlib/libc/machine/xstormy16/Makefile.in          |   1 +
 newlib/libc/machine/z8k/Makefile.in                |   1 +
 newlib/libc/misc/Makefile.in                       |   1 +
 newlib/libc/posix/Makefile.in                      |   1 +
 newlib/libc/reent/Makefile.in                      |   1 +
 newlib/libc/search/Makefile.in                     |   1 +
 newlib/libc/signal/Makefile.in                     |   1 +
 newlib/libc/ssp/Makefile.in                        |   1 +
 newlib/libc/stdio/Makefile.in                      |   1 +
 newlib/libc/stdio64/Makefile.in                    |   1 +
 newlib/libc/stdlib/Makefile.in                     |   1 +
 newlib/libc/string/Makefile.in                     |   1 +
 newlib/libc/sys/a29khif/Makefile.in                |   1 +
 newlib/libc/sys/amdgcn/Makefile.in                 |   1 +
 newlib/libc/sys/arm/Makefile.in                    |   1 +
 newlib/libc/sys/d10v/Makefile.in                   |   1 +
 newlib/libc/sys/decstation/Makefile.in             |   1 +
 newlib/libc/sys/epiphany/Makefile.in               |   1 +
 newlib/libc/sys/h8300hms/Makefile.in               |   1 +
 newlib/libc/sys/h8500hms/Makefile.in               |   1 +
 newlib/libc/sys/linux/Makefile.in                  |   1 +
 newlib/libc/sys/linux/aclocal.m4                   |  60 +++++
 newlib/libc/sys/linux/argp/Makefile.in             |   1 +
 newlib/libc/sys/linux/cmath/Makefile.in            |   1 +
 newlib/libc/sys/linux/configure                    | 270 +++++++++++++--------
 newlib/libc/sys/linux/dl/Makefile.in               |   1 +
 newlib/libc/sys/linux/iconv/Makefile.in            |   1 +
 newlib/libc/sys/linux/intl/Makefile.in             |   1 +
 newlib/libc/sys/linux/linuxthreads/Makefile.in     |   1 +
 newlib/libc/sys/linux/linuxthreads/aclocal.m4      |  60 +++++
 newlib/libc/sys/linux/linuxthreads/configure       | 270 +++++++++++++--------
 .../sys/linux/linuxthreads/machine/Makefile.in     |   1 +
 .../libc/sys/linux/linuxthreads/machine/aclocal.m4 |  60 +++++
 .../libc/sys/linux/linuxthreads/machine/configure  | 270 +++++++++++++--------
 .../linux/linuxthreads/machine/i386/Makefile.in    |   1 +
 .../sys/linux/linuxthreads/machine/i386/aclocal.m4 |  60 +++++
 .../sys/linux/linuxthreads/machine/i386/configure  | 270 +++++++++++++--------
 newlib/libc/sys/linux/machine/Makefile.in          |   1 +
 newlib/libc/sys/linux/machine/aclocal.m4           |  60 +++++
 newlib/libc/sys/linux/machine/configure            | 270 +++++++++++++--------
 newlib/libc/sys/linux/machine/i386/Makefile.in     |   1 +
 newlib/libc/sys/linux/machine/i386/aclocal.m4      |  60 +++++
 newlib/libc/sys/linux/machine/i386/configure       | 270 +++++++++++++--------
 newlib/libc/sys/linux/net/Makefile.in              |   1 +
 newlib/libc/sys/m88kbug/Makefile.in                |   1 +
 newlib/libc/sys/mmixware/Makefile.in               |   1 +
 newlib/libc/sys/netware/Makefile.in                |   1 +
 newlib/libc/sys/or1k/Makefile.in                   |   1 +
 newlib/libc/sys/phoenix/Makefile.in                |   1 +
 newlib/libc/sys/phoenix/aclocal.m4                 |  60 +++++
 newlib/libc/sys/phoenix/configure                  | 265 +++++++++++++-------
 newlib/libc/sys/phoenix/machine/Makefile.in        |   1 +
 newlib/libc/sys/phoenix/machine/aclocal.m4         |  60 +++++
 newlib/libc/sys/phoenix/machine/arm/Makefile.in    |   1 +
 newlib/libc/sys/phoenix/machine/arm/aclocal.m4     |  60 +++++
 newlib/libc/sys/phoenix/machine/arm/configure      | 265 +++++++++++++-------
 newlib/libc/sys/phoenix/machine/configure          | 265 +++++++++++++-------
 newlib/libc/sys/rdos/Makefile.in                   |   1 +
 newlib/libc/sys/rtems/Makefile.in                  |   1 +
 newlib/libc/sys/sh/Makefile.in                     |   1 +
 newlib/libc/sys/sparc64/Makefile.in                |   1 +
 newlib/libc/sys/sun4/Makefile.in                   |   1 +
 newlib/libc/sys/sysmec/Makefile.in                 |   1 +
 newlib/libc/sys/sysnec810/Makefile.in              |   1 +
 newlib/libc/sys/sysnecv850/Makefile.in             |   1 +
 newlib/libc/sys/sysvi386/Makefile.in               |   1 +
 newlib/libc/sys/sysvnecv70/Makefile.in             |   1 +
 newlib/libc/sys/tic80/Makefile.in                  |   1 +
 newlib/libc/sys/tirtos/Makefile.in                 |   1 +
 newlib/libc/sys/w65/Makefile.in                    |   1 +
 newlib/libc/sys/z8ksim/Makefile.in                 |   1 +
 newlib/libc/syscalls/Makefile.in                   |   1 +
 newlib/libc/time/Makefile.in                       |   1 +
 newlib/libc/unix/Makefile.in                       |   1 +
 newlib/libc/xdr/Makefile.in                        |   1 +
 newlib/libm/Makefile.in                            |   1 +
 newlib/libm/aclocal.m4                             |  60 +++++
 newlib/libm/common/Makefile.in                     |   1 +
 newlib/libm/complex/Makefile.in                    |   1 +
 newlib/libm/configure                              | 270 +++++++++++++--------
 newlib/libm/fenv/Makefile.in                       |   1 +
 newlib/libm/machine/aarch64/Makefile.in            |   1 +
 newlib/libm/machine/arm/Makefile.in                |   1 +
 newlib/libm/machine/i386/Makefile.in               |   1 +
 newlib/libm/machine/mips/Makefile.in               |   1 +
 newlib/libm/machine/nds32/Makefile.in              |   1 +
 newlib/libm/machine/powerpc/Makefile.in            |   1 +
 newlib/libm/machine/pru/Makefile.in                |   1 +
 newlib/libm/machine/riscv/Makefile.in              |   1 +
 newlib/libm/machine/sparc/Makefile.in              |   1 +
 newlib/libm/machine/spu/Makefile.in                |   1 +
 newlib/libm/machine/x86_64/Makefile.in             |   1 +
 newlib/libm/math/Makefile.in                       |   1 +
 newlib/libm/mathfp/Makefile.in                     |   1 +
 167 files changed, 2957 insertions(+), 1132 deletions(-)

diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index d76114518..26f838542 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -461,6 +461,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index fcdba70b6..ba42378c9 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -123,7 +123,7 @@ AC_NO_EXECUTABLES
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 AC_REQUIRE([AM_PROG_AS])dnl
-AC_CHECK_TOOL(AR, ar)
+AC_REQUIRE([AM_PROG_AR])dnl
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_CHECK_TOOL(READELF, readelf, :)
 
diff --git a/newlib/aclocal.m4 b/newlib/aclocal.m4
index f671274aa..ac75655f3 100644
--- a/newlib/aclocal.m4
+++ b/newlib/aclocal.m4
@@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
+
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/newlib/configure b/newlib/configure
index 30be07f88..9a440e4ca 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -709,6 +709,7 @@ NO_INCLUDE_LIST
 NEWLIB_CFLAGS
 READELF
 RANLIB
+ac_ct_AR
 AR
 CCASFLAGS
 CCAS
@@ -4220,6 +4221,178 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 
 
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar lib "link -lib"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar lib "link -lib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   am_cv_ar_interface=ar
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+  ;;
+esac
+
+
 # Check whether --enable-target-optspace was given.
 if test "${enable_target_optspace+set}" = set; then :
   enableval=$enable_target_optspace; case "${enableval}" in
@@ -4513,98 +4686,6 @@ AM_BACKSLASH='\'
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -6829,7 +6910,6 @@ fi
 
 
 
-
 
 
 # Check whether --enable-libtool-lock was given.
@@ -11595,7 +11675,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11598 "configure"
+#line 11678 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11701,7 +11781,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11704 "configure"
+#line 11784 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/newlib/libc/Makefile.in b/newlib/libc/Makefile.in
index d473b7227..b1fd6d86d 100644
--- a/newlib/libc/Makefile.in
+++ b/newlib/libc/Makefile.in
@@ -328,6 +328,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/aclocal.m4 b/newlib/libc/aclocal.m4
index ce5020f7c..866dbfe73 100644
--- a/newlib/libc/aclocal.m4
+++ b/newlib/libc/aclocal.m4
@@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
+
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/newlib/libc/argz/Makefile.in b/newlib/libc/argz/Makefile.in
index 61647b5ed..4d9f67dc9 100644
--- a/newlib/libc/argz/Makefile.in
+++ b/newlib/libc/argz/Makefile.in
@@ -304,6 +304,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/configure b/newlib/libc/configure
index fc1cd7d0c..232eb4a74 100755
--- a/newlib/libc/configure
+++ b/newlib/libc/configure
@@ -725,6 +725,7 @@ NO_INCLUDE_LIST
 NEWLIB_CFLAGS
 READELF
 RANLIB
+ac_ct_AR
 AR
 CCASFLAGS
 CCAS
@@ -3915,6 +3916,178 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 
 
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar lib "link -lib"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar lib "link -lib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   am_cv_ar_interface=ar
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+  ;;
+esac
+
+
 # Check whether --enable-target-optspace was given.
 if test "${enable_target_optspace+set}" = set; then :
   enableval=$enable_target_optspace; case "${enableval}" in
@@ -4208,98 +4381,6 @@ AM_BACKSLASH='\'
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -6533,7 +6614,6 @@ fi
 
 
 
-
 
 
 # Check whether --enable-libtool-lock was given.
@@ -11299,7 +11379,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11302 "configure"
+#line 11382 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11405,7 +11485,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11408 "configure"
+#line 11488 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/newlib/libc/ctype/Makefile.in b/newlib/libc/ctype/Makefile.in
index 433559724..2c73d51f9 100644
--- a/newlib/libc/ctype/Makefile.in
+++ b/newlib/libc/ctype/Makefile.in
@@ -362,6 +362,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/errno/Makefile.in b/newlib/libc/errno/Makefile.in
index 8b28efabf..035c9aafa 100644
--- a/newlib/libc/errno/Makefile.in
+++ b/newlib/libc/errno/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/iconv/Makefile.in b/newlib/libc/iconv/Makefile.in
index a1ea655fe..8ebaec159 100644
--- a/newlib/libc/iconv/Makefile.in
+++ b/newlib/libc/iconv/Makefile.in
@@ -276,6 +276,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/iconv/ccs/Makefile.in b/newlib/libc/iconv/ccs/Makefile.in
index 8ae55cd18..9f079a1a5 100644
--- a/newlib/libc/iconv/ccs/Makefile.in
+++ b/newlib/libc/iconv/ccs/Makefile.in
@@ -343,6 +343,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/iconv/ccs/binary/Makefile.in b/newlib/libc/iconv/ccs/binary/Makefile.in
index 93d390431..c1dd99299 100644
--- a/newlib/libc/iconv/ccs/binary/Makefile.in
+++ b/newlib/libc/iconv/ccs/binary/Makefile.in
@@ -242,6 +242,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/iconv/ces/Makefile.in b/newlib/libc/iconv/ces/Makefile.in
index 43263698d..36ca41900 100644
--- a/newlib/libc/iconv/ces/Makefile.in
+++ b/newlib/libc/iconv/ces/Makefile.in
@@ -282,6 +282,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/iconv/lib/Makefile.in b/newlib/libc/iconv/lib/Makefile.in
index 8f8e1fb2e..e9869a729 100644
--- a/newlib/libc/iconv/lib/Makefile.in
+++ b/newlib/libc/iconv/lib/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/locale/Makefile.in b/newlib/libc/locale/Makefile.in
index 8b2c424cd..a2ab77fa6 100644
--- a/newlib/libc/locale/Makefile.in
+++ b/newlib/libc/locale/Makefile.in
@@ -293,6 +293,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/a29k/Makefile.in b/newlib/libc/machine/a29k/Makefile.in
index 8ef41e531..fd6204da5 100644
--- a/newlib/libc/machine/a29k/Makefile.in
+++ b/newlib/libc/machine/a29k/Makefile.in
@@ -246,6 +246,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/aarch64/Makefile.in b/newlib/libc/machine/aarch64/Makefile.in
index 83035f7aa..aa4736714 100644
--- a/newlib/libc/machine/aarch64/Makefile.in
+++ b/newlib/libc/machine/aarch64/Makefile.in
@@ -288,6 +288,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/amdgcn/Makefile.in b/newlib/libc/machine/amdgcn/Makefile.in
index b7cdb20f8..7240287c9 100644
--- a/newlib/libc/machine/amdgcn/Makefile.in
+++ b/newlib/libc/machine/amdgcn/Makefile.in
@@ -266,6 +266,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/arc/Makefile.in b/newlib/libc/machine/arc/Makefile.in
index 4239fff9f..e0db46035 100644
--- a/newlib/libc/machine/arc/Makefile.in
+++ b/newlib/libc/machine/arc/Makefile.in
@@ -287,6 +287,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/arm/Makefile.in b/newlib/libc/machine/arm/Makefile.in
index a49a04734..8ac00bcb6 100644
--- a/newlib/libc/machine/arm/Makefile.in
+++ b/newlib/libc/machine/arm/Makefile.in
@@ -281,6 +281,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/bfin/Makefile.in b/newlib/libc/machine/bfin/Makefile.in
index df07f8bc7..028d8fdbc 100644
--- a/newlib/libc/machine/bfin/Makefile.in
+++ b/newlib/libc/machine/bfin/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/cr16/Makefile.in b/newlib/libc/machine/cr16/Makefile.in
index 87dd45855..5d1c56861 100644
--- a/newlib/libc/machine/cr16/Makefile.in
+++ b/newlib/libc/machine/cr16/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/cris/Makefile.in b/newlib/libc/machine/cris/Makefile.in
index 856d6d0d6..2b49b3988 100644
--- a/newlib/libc/machine/cris/Makefile.in
+++ b/newlib/libc/machine/cris/Makefile.in
@@ -300,6 +300,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/crx/Makefile.in b/newlib/libc/machine/crx/Makefile.in
index cf37ffd57..24a10330f 100644
--- a/newlib/libc/machine/crx/Makefile.in
+++ b/newlib/libc/machine/crx/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/csky/Makefile.in b/newlib/libc/machine/csky/Makefile.in
index abce62ba0..6a976971c 100644
--- a/newlib/libc/machine/csky/Makefile.in
+++ b/newlib/libc/machine/csky/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/d10v/Makefile.in b/newlib/libc/machine/d10v/Makefile.in
index fd62c5bfd..657560aae 100644
--- a/newlib/libc/machine/d10v/Makefile.in
+++ b/newlib/libc/machine/d10v/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/d30v/Makefile.in b/newlib/libc/machine/d30v/Makefile.in
index 038c70023..da88ed7df 100644
--- a/newlib/libc/machine/d30v/Makefile.in
+++ b/newlib/libc/machine/d30v/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/epiphany/Makefile.in b/newlib/libc/machine/epiphany/Makefile.in
index 03ca4aa28..7ec8385d6 100644
--- a/newlib/libc/machine/epiphany/Makefile.in
+++ b/newlib/libc/machine/epiphany/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/fr30/Makefile.in b/newlib/libc/machine/fr30/Makefile.in
index 60b015e5e..8ea3b1ab3 100644
--- a/newlib/libc/machine/fr30/Makefile.in
+++ b/newlib/libc/machine/fr30/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/frv/Makefile.in b/newlib/libc/machine/frv/Makefile.in
index 2a31e29dc..b7fb11b89 100644
--- a/newlib/libc/machine/frv/Makefile.in
+++ b/newlib/libc/machine/frv/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/ft32/Makefile.in b/newlib/libc/machine/ft32/Makefile.in
index 10aa79a50..ccc1a2925 100644
--- a/newlib/libc/machine/ft32/Makefile.in
+++ b/newlib/libc/machine/ft32/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/h8300/Makefile.in b/newlib/libc/machine/h8300/Makefile.in
index 702874ab7..4eed192e9 100644
--- a/newlib/libc/machine/h8300/Makefile.in
+++ b/newlib/libc/machine/h8300/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/h8500/Makefile.in b/newlib/libc/machine/h8500/Makefile.in
index 162d5d5a1..b23f1d5a0 100644
--- a/newlib/libc/machine/h8500/Makefile.in
+++ b/newlib/libc/machine/h8500/Makefile.in
@@ -276,6 +276,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/hppa/Makefile.in b/newlib/libc/machine/hppa/Makefile.in
index 95d1a46e1..6f3d94cea 100644
--- a/newlib/libc/machine/hppa/Makefile.in
+++ b/newlib/libc/machine/hppa/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/i386/Makefile.in b/newlib/libc/machine/i386/Makefile.in
index 1aa780c3e..17ac11168 100644
--- a/newlib/libc/machine/i386/Makefile.in
+++ b/newlib/libc/machine/i386/Makefile.in
@@ -295,6 +295,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/i960/Makefile.in b/newlib/libc/machine/i960/Makefile.in
index 1f29046bf..d3dfad33d 100644
--- a/newlib/libc/machine/i960/Makefile.in
+++ b/newlib/libc/machine/i960/Makefile.in
@@ -246,6 +246,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/iq2000/Makefile.in b/newlib/libc/machine/iq2000/Makefile.in
index a7840b9bd..9e34dabee 100644
--- a/newlib/libc/machine/iq2000/Makefile.in
+++ b/newlib/libc/machine/iq2000/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/lm32/Makefile.in b/newlib/libc/machine/lm32/Makefile.in
index 893c2787d..985700154 100644
--- a/newlib/libc/machine/lm32/Makefile.in
+++ b/newlib/libc/machine/lm32/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/m32c/Makefile.in b/newlib/libc/machine/m32c/Makefile.in
index 8cff083ee..be3b1056f 100644
--- a/newlib/libc/machine/m32c/Makefile.in
+++ b/newlib/libc/machine/m32c/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/m32r/Makefile.in b/newlib/libc/machine/m32r/Makefile.in
index 34f1d9590..bd0746f64 100644
--- a/newlib/libc/machine/m32r/Makefile.in
+++ b/newlib/libc/machine/m32r/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/m68hc11/Makefile.in b/newlib/libc/machine/m68hc11/Makefile.in
index d5ea9d481..9da40bce5 100644
--- a/newlib/libc/machine/m68hc11/Makefile.in
+++ b/newlib/libc/machine/m68hc11/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/m68k/Makefile.in b/newlib/libc/machine/m68k/Makefile.in
index 0d7f88feb..eec186675 100644
--- a/newlib/libc/machine/m68k/Makefile.in
+++ b/newlib/libc/machine/m68k/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/m88k/Makefile.in b/newlib/libc/machine/m88k/Makefile.in
index 9c16e9ffa..6e62404fc 100644
--- a/newlib/libc/machine/m88k/Makefile.in
+++ b/newlib/libc/machine/m88k/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/mep/Makefile.in b/newlib/libc/machine/mep/Makefile.in
index 12caa74d3..0801cfd21 100644
--- a/newlib/libc/machine/mep/Makefile.in
+++ b/newlib/libc/machine/mep/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/microblaze/Makefile.in b/newlib/libc/machine/microblaze/Makefile.in
index ccc813164..bb4e81036 100644
--- a/newlib/libc/machine/microblaze/Makefile.in
+++ b/newlib/libc/machine/microblaze/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/mips/Makefile.in b/newlib/libc/machine/mips/Makefile.in
index 2dbbcfdfd..c205f4130 100644
--- a/newlib/libc/machine/mips/Makefile.in
+++ b/newlib/libc/machine/mips/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/mn10200/Makefile.in b/newlib/libc/machine/mn10200/Makefile.in
index 8a90f0a68..38e6d7e05 100644
--- a/newlib/libc/machine/mn10200/Makefile.in
+++ b/newlib/libc/machine/mn10200/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/mn10300/Makefile.in b/newlib/libc/machine/mn10300/Makefile.in
index bfaf5b917..75c9c4968 100644
--- a/newlib/libc/machine/mn10300/Makefile.in
+++ b/newlib/libc/machine/mn10300/Makefile.in
@@ -276,6 +276,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/moxie/Makefile.in b/newlib/libc/machine/moxie/Makefile.in
index 15e204961..5005c374b 100644
--- a/newlib/libc/machine/moxie/Makefile.in
+++ b/newlib/libc/machine/moxie/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/msp430/Makefile.in b/newlib/libc/machine/msp430/Makefile.in
index cc1658c5d..73ab7dfd9 100644
--- a/newlib/libc/machine/msp430/Makefile.in
+++ b/newlib/libc/machine/msp430/Makefile.in
@@ -290,6 +290,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/mt/Makefile.in b/newlib/libc/machine/mt/Makefile.in
index c7c5f2b00..75ba3c622 100644
--- a/newlib/libc/machine/mt/Makefile.in
+++ b/newlib/libc/machine/mt/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/nds32/Makefile.in b/newlib/libc/machine/nds32/Makefile.in
index b8bd0f779..d27ed699c 100644
--- a/newlib/libc/machine/nds32/Makefile.in
+++ b/newlib/libc/machine/nds32/Makefile.in
@@ -280,6 +280,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/necv70/Makefile.in b/newlib/libc/machine/necv70/Makefile.in
index 76b26167b..a9404df8e 100644
--- a/newlib/libc/machine/necv70/Makefile.in
+++ b/newlib/libc/machine/necv70/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/nios2/Makefile.in b/newlib/libc/machine/nios2/Makefile.in
index a5408bb3b..05aab3478 100644
--- a/newlib/libc/machine/nios2/Makefile.in
+++ b/newlib/libc/machine/nios2/Makefile.in
@@ -272,6 +272,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/nvptx/Makefile.in b/newlib/libc/machine/nvptx/Makefile.in
index 463e6d4ed..c584d4e27 100644
--- a/newlib/libc/machine/nvptx/Makefile.in
+++ b/newlib/libc/machine/nvptx/Makefile.in
@@ -271,6 +271,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/or1k/Makefile.in b/newlib/libc/machine/or1k/Makefile.in
index bcfc995fa..2ae222b34 100644
--- a/newlib/libc/machine/or1k/Makefile.in
+++ b/newlib/libc/machine/or1k/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/powerpc/Makefile.in b/newlib/libc/machine/powerpc/Makefile.in
index 2ba4eae2a..f712c31b0 100644
--- a/newlib/libc/machine/powerpc/Makefile.in
+++ b/newlib/libc/machine/powerpc/Makefile.in
@@ -302,6 +302,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/pru/Makefile.in b/newlib/libc/machine/pru/Makefile.in
index 93ee0320a..16fbe06d0 100644
--- a/newlib/libc/machine/pru/Makefile.in
+++ b/newlib/libc/machine/pru/Makefile.in
@@ -272,6 +272,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/riscv/Makefile.in b/newlib/libc/machine/riscv/Makefile.in
index 080ea51cb..dc188545b 100644
--- a/newlib/libc/machine/riscv/Makefile.in
+++ b/newlib/libc/machine/riscv/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/rl78/Makefile.in b/newlib/libc/machine/rl78/Makefile.in
index 1773030bf..49eb5f619 100644
--- a/newlib/libc/machine/rl78/Makefile.in
+++ b/newlib/libc/machine/rl78/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/rx/Makefile.in b/newlib/libc/machine/rx/Makefile.in
index b40e070e6..c76c5d4f0 100644
--- a/newlib/libc/machine/rx/Makefile.in
+++ b/newlib/libc/machine/rx/Makefile.in
@@ -278,6 +278,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/sh/Makefile.in b/newlib/libc/machine/sh/Makefile.in
index f1f2cb967..8c7d35ec2 100644
--- a/newlib/libc/machine/sh/Makefile.in
+++ b/newlib/libc/machine/sh/Makefile.in
@@ -279,6 +279,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/sparc/Makefile.in b/newlib/libc/machine/sparc/Makefile.in
index 7d2581015..5fa7a11d1 100644
--- a/newlib/libc/machine/sparc/Makefile.in
+++ b/newlib/libc/machine/sparc/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/spu/Makefile.in b/newlib/libc/machine/spu/Makefile.in
index 0705d1141..520a1d2b1 100644
--- a/newlib/libc/machine/spu/Makefile.in
+++ b/newlib/libc/machine/spu/Makefile.in
@@ -360,6 +360,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/tic4x/Makefile.in b/newlib/libc/machine/tic4x/Makefile.in
index 9aaaa7699..07993cd9d 100644
--- a/newlib/libc/machine/tic4x/Makefile.in
+++ b/newlib/libc/machine/tic4x/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/tic6x/Makefile.in b/newlib/libc/machine/tic6x/Makefile.in
index 918c7664b..02f7a4cea 100644
--- a/newlib/libc/machine/tic6x/Makefile.in
+++ b/newlib/libc/machine/tic6x/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/tic80/Makefile.in b/newlib/libc/machine/tic80/Makefile.in
index 03f838cc2..b03093957 100644
--- a/newlib/libc/machine/tic80/Makefile.in
+++ b/newlib/libc/machine/tic80/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/v850/Makefile.in b/newlib/libc/machine/v850/Makefile.in
index ad954e515..32231204c 100644
--- a/newlib/libc/machine/v850/Makefile.in
+++ b/newlib/libc/machine/v850/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/visium/Makefile.in b/newlib/libc/machine/visium/Makefile.in
index 409e71be5..9f00e5b22 100644
--- a/newlib/libc/machine/visium/Makefile.in
+++ b/newlib/libc/machine/visium/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/w65/Makefile.in b/newlib/libc/machine/w65/Makefile.in
index 67a349c5d..bbb5c8b89 100644
--- a/newlib/libc/machine/w65/Makefile.in
+++ b/newlib/libc/machine/w65/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/x86_64/Makefile.in b/newlib/libc/machine/x86_64/Makefile.in
index 4ca7664b2..febe2c9cc 100644
--- a/newlib/libc/machine/x86_64/Makefile.in
+++ b/newlib/libc/machine/x86_64/Makefile.in
@@ -274,6 +274,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/xc16x/Makefile.in b/newlib/libc/machine/xc16x/Makefile.in
index 94baacffc..76a3e6392 100644
--- a/newlib/libc/machine/xc16x/Makefile.in
+++ b/newlib/libc/machine/xc16x/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/xstormy16/Makefile.in b/newlib/libc/machine/xstormy16/Makefile.in
index b91c3b0a7..a7169d565 100644
--- a/newlib/libc/machine/xstormy16/Makefile.in
+++ b/newlib/libc/machine/xstormy16/Makefile.in
@@ -273,6 +273,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/machine/z8k/Makefile.in b/newlib/libc/machine/z8k/Makefile.in
index 2d1f09324..82681fcb2 100644
--- a/newlib/libc/machine/z8k/Makefile.in
+++ b/newlib/libc/machine/z8k/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/misc/Makefile.in b/newlib/libc/misc/Makefile.in
index c2c74e48a..a87f2017d 100644
--- a/newlib/libc/misc/Makefile.in
+++ b/newlib/libc/misc/Makefile.in
@@ -286,6 +286,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/posix/Makefile.in b/newlib/libc/posix/Makefile.in
index e84d05858..b73b64675 100644
--- a/newlib/libc/posix/Makefile.in
+++ b/newlib/libc/posix/Makefile.in
@@ -316,6 +316,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/reent/Makefile.in b/newlib/libc/reent/Makefile.in
index 280cc43e0..37ee8f3ec 100644
--- a/newlib/libc/reent/Makefile.in
+++ b/newlib/libc/reent/Makefile.in
@@ -312,6 +312,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/search/Makefile.in b/newlib/libc/search/Makefile.in
index 569ffc600..94cd9793d 100644
--- a/newlib/libc/search/Makefile.in
+++ b/newlib/libc/search/Makefile.in
@@ -301,6 +301,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/signal/Makefile.in b/newlib/libc/signal/Makefile.in
index bd1837a11..f6e997865 100644
--- a/newlib/libc/signal/Makefile.in
+++ b/newlib/libc/signal/Makefile.in
@@ -278,6 +278,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/ssp/Makefile.in b/newlib/libc/ssp/Makefile.in
index d7ff98ed6..0baf000de 100644
--- a/newlib/libc/ssp/Makefile.in
+++ b/newlib/libc/ssp/Makefile.in
@@ -301,6 +301,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in
index 3b01dd6e5..dd3e65d9d 100644
--- a/newlib/libc/stdio/Makefile.in
+++ b/newlib/libc/stdio/Makefile.in
@@ -468,6 +468,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/stdio64/Makefile.in b/newlib/libc/stdio64/Makefile.in
index 8d036c063..8f26c89ca 100644
--- a/newlib/libc/stdio64/Makefile.in
+++ b/newlib/libc/stdio64/Makefile.in
@@ -292,6 +292,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in
index 66d0b7d54..913b5b06f 100644
--- a/newlib/libc/stdlib/Makefile.in
+++ b/newlib/libc/stdlib/Makefile.in
@@ -395,6 +395,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/string/Makefile.in b/newlib/libc/string/Makefile.in
index 6bd5063a2..4935e635a 100644
--- a/newlib/libc/string/Makefile.in
+++ b/newlib/libc/string/Makefile.in
@@ -379,6 +379,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/a29khif/Makefile.in b/newlib/libc/sys/a29khif/Makefile.in
index 6efe3ede1..a382f4c3b 100644
--- a/newlib/libc/sys/a29khif/Makefile.in
+++ b/newlib/libc/sys/a29khif/Makefile.in
@@ -285,6 +285,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/amdgcn/Makefile.in b/newlib/libc/sys/amdgcn/Makefile.in
index 2beaf2640..26fdad98b 100644
--- a/newlib/libc/sys/amdgcn/Makefile.in
+++ b/newlib/libc/sys/amdgcn/Makefile.in
@@ -270,6 +270,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
index e7bd21f4f..6f1395a04 100644
--- a/newlib/libc/sys/arm/Makefile.in
+++ b/newlib/libc/sys/arm/Makefile.in
@@ -279,6 +279,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/d10v/Makefile.in b/newlib/libc/sys/d10v/Makefile.in
index 0a1d7d034..711b65c27 100644
--- a/newlib/libc/sys/d10v/Makefile.in
+++ b/newlib/libc/sys/d10v/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/decstation/Makefile.in b/newlib/libc/sys/decstation/Makefile.in
index 8fdce9016..e8f08542c 100644
--- a/newlib/libc/sys/decstation/Makefile.in
+++ b/newlib/libc/sys/decstation/Makefile.in
@@ -264,6 +264,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/epiphany/Makefile.in b/newlib/libc/sys/epiphany/Makefile.in
index c27a1d63f..415cad4d8 100644
--- a/newlib/libc/sys/epiphany/Makefile.in
+++ b/newlib/libc/sys/epiphany/Makefile.in
@@ -290,6 +290,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/h8300hms/Makefile.in b/newlib/libc/sys/h8300hms/Makefile.in
index bfbab6dc0..d9e11bcf0 100644
--- a/newlib/libc/sys/h8300hms/Makefile.in
+++ b/newlib/libc/sys/h8300hms/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/h8500hms/Makefile.in b/newlib/libc/sys/h8500hms/Makefile.in
index 91daeede5..1834be077 100644
--- a/newlib/libc/sys/h8500hms/Makefile.in
+++ b/newlib/libc/sys/h8500hms/Makefile.in
@@ -264,6 +264,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in
index ded01948d..bfd4b6e9a 100644
--- a/newlib/libc/sys/linux/Makefile.in
+++ b/newlib/libc/sys/linux/Makefile.in
@@ -386,6 +386,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/aclocal.m4 b/newlib/libc/sys/linux/aclocal.m4
index fea3ad003..efb399b43 100644
--- a/newlib/libc/sys/linux/aclocal.m4
+++ b/newlib/libc/sys/linux/aclocal.m4
@@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
+
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/newlib/libc/sys/linux/argp/Makefile.in b/newlib/libc/sys/linux/argp/Makefile.in
index 1114c37db..f64a73dd0 100644
--- a/newlib/libc/sys/linux/argp/Makefile.in
+++ b/newlib/libc/sys/linux/argp/Makefile.in
@@ -269,6 +269,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/cmath/Makefile.in b/newlib/libc/sys/linux/cmath/Makefile.in
index c8e126afe..b5d6864fe 100644
--- a/newlib/libc/sys/linux/cmath/Makefile.in
+++ b/newlib/libc/sys/linux/cmath/Makefile.in
@@ -287,6 +287,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure
index b93c46324..3f8fe6b34 100755
--- a/newlib/libc/sys/linux/configure
+++ b/newlib/libc/sys/linux/configure
@@ -680,6 +680,7 @@ NO_INCLUDE_LIST
 NEWLIB_CFLAGS
 READELF
 RANLIB
+ac_ct_AR
 AR
 CCASFLAGS
 CCAS
@@ -3795,6 +3796,178 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 
 
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar lib "link -lib"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar lib "link -lib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   am_cv_ar_interface=ar
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+  ;;
+esac
+
+
 # Check whether --enable-target-optspace was given.
 if test "${enable_target_optspace+set}" = set; then :
   enableval=$enable_target_optspace; case "${enableval}" in
@@ -4088,98 +4261,6 @@ AM_BACKSLASH='\'
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -6404,7 +6485,6 @@ fi
 
 
 
-
 
 
 # Check whether --enable-libtool-lock was given.
@@ -11170,7 +11250,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11173 "configure"
+#line 11253 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11276,7 +11356,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11279 "configure"
+#line 11359 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/newlib/libc/sys/linux/dl/Makefile.in b/newlib/libc/sys/linux/dl/Makefile.in
index 271316a43..574d44393 100644
--- a/newlib/libc/sys/linux/dl/Makefile.in
+++ b/newlib/libc/sys/linux/dl/Makefile.in
@@ -277,6 +277,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/iconv/Makefile.in b/newlib/libc/sys/linux/iconv/Makefile.in
index 3fca46282..0df1a26a1 100644
--- a/newlib/libc/sys/linux/iconv/Makefile.in
+++ b/newlib/libc/sys/linux/iconv/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/intl/Makefile.in b/newlib/libc/sys/linux/intl/Makefile.in
index 6467a9803..11f8fe8cc 100644
--- a/newlib/libc/sys/linux/intl/Makefile.in
+++ b/newlib/libc/sys/linux/intl/Makefile.in
@@ -275,6 +275,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/linuxthreads/Makefile.in b/newlib/libc/sys/linux/linuxthreads/Makefile.in
index 77cb6ca07..a994aa548 100644
--- a/newlib/libc/sys/linux/linuxthreads/Makefile.in
+++ b/newlib/libc/sys/linux/linuxthreads/Makefile.in
@@ -417,6 +417,7 @@ abs_newlib_basedir = @abs_newlib_basedir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 aext = @aext@
diff --git a/newlib/libc/sys/linux/linuxthreads/aclocal.m4 b/newlib/libc/sys/linux/linuxthreads/aclocal.m4
index 302662e3a..1077c090f 100644
--- a/newlib/libc/sys/linux/linuxthreads/aclocal.m4
+++ b/newlib/libc/sys/linux/linuxthreads/aclocal.m4
@@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
+
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure
index 5fdd63bf9..7e6f508d7 100755
--- a/newlib/libc/sys/linux/linuxthreads/configure
+++ b/newlib/libc/sys/linux/linuxthreads/configure
@@ -679,6 +679,7 @@ NO_INCLUDE_LIST
 NEWLIB_CFLAGS
 READELF
 RANLIB
+ac_ct_AR
 AR
 CCASFLAGS
 CCAS
@@ -3793,6 +3794,178 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 
 
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar lib "link -lib"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar lib "link -lib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   am_cv_ar_interface=ar
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+  ;;
+esac
+
+
 # Check whether --enable-target-optspace was given.
 if test "${enable_target_optspace+set}" = set; then :
   enableval=$enable_target_optspace; case "${enableval}" in
@@ -4086,98 +4259,6 @@ AM_BACKSLASH='\'
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo [...]

[diff truncated at 100000 bytes]


                 reply	other threads:[~2022-02-09  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220209031754.6CE9A3858D28@sourceware.org \
    --to=vapier@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).