Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB.
bfd/ PR ld/27173 binutils/ PR ld/27173 * configure: Regenerated. gas/ PR ld/27173 * configure: Regenerated. gprof/ PR ld/27173 * configure: Regenerated. ld/ PR ld/27173 * configure: Regenerated. libctf/ PR ld/27173 * configure: Regenerated. opcodes/ PR ld/27173 * configure: Regenerated. --- bfd/configure | 13 ++++++++++--- binutils/configure | 13 ++++++++++--- gas/configure | 13 ++++++++++--- gprof/configure | 13 ++++++++++--- ld/configure | 13 ++++++++++--- libctf/configure | 13 ++++++++++--- opcodes/configure | 13 ++++++++++--- 7 files changed, 70 insertions(+), 21 deletions(-) diff --git a/bfd/configure b/bfd/configure index 4b8dede2150..6142cb26f50 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6932,7 +6932,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11742,7 +11749,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11745 "configure" +#line 11752 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11848,7 +11855,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11851 "configure" +#line 11858 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/binutils/configure b/binutils/configure index f1b80648d3f..249aa16c6fc 100755 --- a/binutils/configure +++ b/binutils/configure @@ -6728,7 +6728,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11569,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 11572 "configure" +#line 11579 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11675,7 +11682,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11678 "configure" +#line 11685 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gas/configure b/gas/configure index 43ac48491db..57aef39de28 100755 --- a/gas/configure +++ b/gas/configure @@ -6516,7 +6516,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11357,7 +11364,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11360 "configure" +#line 11367 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11463,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 11466 "configure" +#line 11473 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gprof/configure b/gprof/configure index ce3a1d5bd11..30dc9257368 100755 --- a/gprof/configure +++ b/gprof/configure @@ -6363,7 +6363,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11204,7 +11211,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11207 "configure" +#line 11214 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11310,7 +11317,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11313 "configure" +#line 11320 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/ld/configure b/ld/configure index d7cd782957f..e551a2e431b 100755 --- a/ld/configure +++ b/ld/configure @@ -7214,7 +7214,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12056,7 +12063,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12059 "configure" +#line 12066 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12162,7 +12169,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12165 "configure" +#line 12172 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libctf/configure b/libctf/configure index 3d2f22528d3..b4e6a4cc1f2 100755 --- a/libctf/configure +++ b/libctf/configure @@ -6720,7 +6720,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11531,7 +11538,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11534 "configure" +#line 11541 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11637,7 +11644,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11640 "configure" +#line 11647 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/opcodes/configure b/opcodes/configure index 92b4b2247d6..6149d0529b5 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -6641,7 +6641,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11452,7 +11459,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11455 "configure" +#line 11462 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11558,7 +11565,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11561 "configure" +#line 11568 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- 2.29.2