From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 0AE5B3942006; Wed, 12 Jan 2022 13:52:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AE5B3942006 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Frysinger To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] GCC: Check if AR works with --plugin and rc X-Act-Checkin: newlib-cygwin X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: d8d5dac0fe978d9b0eed3726b863d176809983cd X-Git-Newrev: 88d86e59701b3a747a55554baeb51369ae52bd18 Message-Id: <20220112135230.0AE5B3942006@sourceware.org> Date: Wed, 12 Jan 2022 13:52:30 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2022 13:52:30 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=88d86e59701b3a747a55554baeb51369ae52bd18 commit 88d86e59701b3a747a55554baeb51369ae52bd18 Author: H.J. Lu Date: Mon Jan 11 16:26:39 2021 -0800 GCC: Check if AR works with --plugin and rc AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. PR ld/27173 * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ PR ld/27173 * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. libiberty/ PR ld/27173 * configure: Regenerated. zlib/ PR ld/27173 * configure: Regenerated. Diff: --- config/gcc-plugin.m4 | 12 +++ configure | 103 +++++++++++++++++++++ libtool.m4 | 9 +- newlib/configure | 14 ++- newlib/iconvdata/configure | 14 ++- newlib/libc/configure | 14 ++- newlib/libc/machine/configure | 14 ++- newlib/libc/machine/i386/configure | 14 ++- newlib/libc/sys/configure | 14 ++- newlib/libc/sys/linux/configure | 14 ++- newlib/libc/sys/linux/linuxthreads/configure | 14 ++- .../libc/sys/linux/linuxthreads/machine/configure | 14 ++- .../sys/linux/linuxthreads/machine/i386/configure | 14 ++- newlib/libc/sys/linux/machine/configure | 14 ++- newlib/libc/sys/linux/machine/i386/configure | 14 ++- newlib/libm/configure | 14 ++- newlib/libm/machine/configure | 14 ++- newlib/libm/machine/i386/configure | 14 ++- newlib/libm/machine/x86_64/configure | 14 ++- 19 files changed, 299 insertions(+), 49 deletions(-) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 5e907ca5c..23c95be27 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -132,6 +132,18 @@ for plugin in $plugin_names; do break fi done +dnl Check if ${AR} $plugin_option rc works. +AC_CHECK_TOOL(AR, ar) +if test "${AR}" = "" ; then + AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then $1="$plugin_option" AC_MSG_RESULT($plugin_option) diff --git a/configure b/configure index 8d0da271f..85a37cd21 100755 --- a/configure +++ b/configure @@ -10024,6 +10024,109 @@ for plugin in $plugin_names; do break fi done +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 "${AR}" = "" ; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then PLUGIN_OPTION="$plugin_option" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 diff --git a/libtool.m4 b/libtool.m4 index 3672e9516..9a13f3b11 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1340,7 +1340,14 @@ AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru diff --git a/newlib/configure b/newlib/configure index edeb65878..1f00059e0 100755 --- a/newlib/configure +++ b/newlib/configure @@ -6734,7 +6734,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11841,7 +11849,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11844 "configure" +#line 11852 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11947,7 +11955,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11950 "configure" +#line 11958 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure index 029774377..c22758861 100755 --- a/newlib/iconvdata/configure +++ b/newlib/iconvdata/configure @@ -6309,7 +6309,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11416,7 +11424,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11419 "configure" +#line 11427 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11522,7 +11530,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11525 "configure" +#line 11533 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/configure b/newlib/libc/configure index 80a70e882..20e49fe80 100755 --- a/newlib/libc/configure +++ b/newlib/libc/configure @@ -6433,7 +6433,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11540,7 +11548,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11543 "configure" +#line 11551 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11646,7 +11654,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11649 "configure" +#line 11657 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure index e0198319a..88b1e9a23 100755 --- a/newlib/libc/machine/configure +++ b/newlib/libc/machine/configure @@ -6371,7 +6371,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11478,7 +11486,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11481 "configure" +#line 11489 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11584,7 +11592,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11587 "configure" +#line 11595 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/machine/i386/configure b/newlib/libc/machine/i386/configure index c3c4178cc..ee723a3ef 100755 --- a/newlib/libc/machine/i386/configure +++ b/newlib/libc/machine/i386/configure @@ -6311,7 +6311,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11418,7 +11426,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11421 "configure" +#line 11429 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11524,7 +11532,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11527 "configure" +#line 11535 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure index 9411ac5fa..d94bbdb48 100755 --- a/newlib/libc/sys/configure +++ b/newlib/libc/sys/configure @@ -6341,7 +6341,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11448,7 +11456,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11451 "configure" +#line 11459 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11554,7 +11562,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11557 "configure" +#line 11565 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure index 8ffec5c73..d51aaf6fb 100755 --- a/newlib/libc/sys/linux/configure +++ b/newlib/libc/sys/linux/configure @@ -6357,7 +6357,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11464,7 +11472,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11467 "configure" +#line 11475 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11570,7 +11578,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11573 "configure" +#line 11581 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure index 635bbdc92..6487cd8db 100755 --- a/newlib/libc/sys/linux/linuxthreads/configure +++ b/newlib/libc/sys/linux/linuxthreads/configure @@ -6355,7 +6355,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11462,7 +11470,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11465 "configure" +#line 11473 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11568,7 +11576,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11571 "configure" +#line 11579 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure index d5fb42802..886bce03c 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/configure @@ -6313,7 +6313,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11420,7 +11428,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11423 "configure" +#line 11431 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11526,7 +11534,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11529 "configure" +#line 11537 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure index 4253af16c..e640dcdc2 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure @@ -6351,7 +6351,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11458,7 +11466,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11461 "configure" +#line 11469 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11564,7 +11572,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11567 "configure" +#line 11575 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure index 6c485aff8..48ebfca37 100755 --- a/newlib/libc/sys/linux/machine/configure +++ b/newlib/libc/sys/linux/machine/configure @@ -6314,7 +6314,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11421,7 +11429,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11424 "configure" +#line 11432 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11527,7 +11535,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11530 "configure" +#line 11538 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure index a464e4a18..4d30fa9f2 100755 --- a/newlib/libc/sys/linux/machine/i386/configure +++ b/newlib/libc/sys/linux/machine/i386/configure @@ -6351,7 +6351,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11458,7 +11466,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11461 "configure" +#line 11469 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11564,7 +11572,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11567 "configure" +#line 11575 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libm/configure b/newlib/libm/configure index ee06ba8be..db7102207 100755 --- a/newlib/libm/configure +++ b/newlib/libm/configure @@ -6373,7 +6373,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11480,7 +11488,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11483 "configure" +#line 11491 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11586,7 +11594,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11589 "configure" +#line 11597 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 2c119d4e6..97738e7aa 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -6324,7 +6324,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11431,7 +11439,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11434 "configure" +#line 11442 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11537,7 +11545,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11540 "configure" +#line 11548 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libm/machine/i386/configure b/newlib/libm/machine/i386/configure index 11ef84174..d5d599fbb 100755 --- a/newlib/libm/machine/i386/configure +++ b/newlib/libm/machine/i386/configure @@ -6309,7 +6309,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11416,7 +11424,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11419 "configure" +#line 11427 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11522,7 +11530,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11525 "configure" +#line 11533 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/libm/machine/x86_64/configure b/newlib/libm/machine/x86_64/configure index 828a23135..b7e564df7 100755 --- a/newlib/libm/machine/x86_64/configure +++ b/newlib/libm/machine/x86_64/configure @@ -6309,7 +6309,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11416,7 +11424,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11419 "configure" +#line 11427 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11522,7 +11530,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11525 "configure" +#line 11533 "configure" #include "confdefs.h" #if HAVE_DLFCN_H