From 83b33c6cb90db6c110bff0d5024713e8af747005 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 11 Jan 2021 16:29:31 -0800 Subject: [PATCH] Binutils: Check if AR works with --plugin and rc 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/ChangeLog | 5 +++++ bfd/configure | 14 +++++++++++--- binutils/ChangeLog | 5 +++++ binutils/configure | 14 +++++++++++--- gas/ChangeLog | 5 +++++ gas/configure | 14 +++++++++++--- gprof/ChangeLog | 5 +++++ gprof/configure | 14 +++++++++++--- ld/ChangeLog | 5 +++++ ld/configure | 14 +++++++++++--- libctf/ChangeLog | 5 +++++ libctf/configure | 14 +++++++++++--- opcodes/ChangeLog | 5 +++++ opcodes/configure | 14 +++++++++++--- 14 files changed, 112 insertions(+), 21 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 876cd1c86e3..38123b44407 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-11 Nick Clifton * po/fr.po: Updated French translation. diff --git a/bfd/configure b/bfd/configure index 4b8dede2150..32c547f53bc 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6932,7 +6932,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 @@ -11742,7 +11750,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 11753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11848,7 +11856,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 11859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 13d05612618..49c15f4bd91 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-11 Nick Clifton * po/pt.po: Updated Portuguese translation. diff --git a/binutils/configure b/binutils/configure index f1b80648d3f..5fa72aed16b 100755 --- a/binutils/configure +++ b/binutils/configure @@ -6728,7 +6728,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 @@ -11569,7 +11577,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 11580 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11675,7 +11683,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 11686 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gas/ChangeLog b/gas/ChangeLog index d65b6216677..f8f8c1bc0ec 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-10-11 Kyrylo Tkachov * NEWS: Remove CSRE. diff --git a/gas/configure b/gas/configure index 43ac48491db..9dd469b3432 100755 --- a/gas/configure +++ b/gas/configure @@ -6516,7 +6516,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 @@ -11357,7 +11365,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 11368 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11463,7 +11471,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 11474 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gprof/ChangeLog b/gprof/ChangeLog index c6127850d0e..8d4c1feeeef 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-09 H.J. Lu * configure: Regenerated. diff --git a/gprof/configure b/gprof/configure index ce3a1d5bd11..375a033aa91 100755 --- a/gprof/configure +++ b/gprof/configure @@ -6363,7 +6363,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 @@ -11204,7 +11212,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 11215 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11310,7 +11318,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 11321 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/ld/ChangeLog b/ld/ChangeLog index 9dc7c3ffda3..bedd0fa326f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-11 Matt Jenkins PR ld/27167 diff --git a/ld/configure b/ld/configure index d7cd782957f..4a965be70d7 100755 --- a/ld/configure +++ b/ld/configure @@ -7214,7 +7214,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 @@ -12056,7 +12064,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 12067 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12162,7 +12170,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 12173 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 4970cab4e4a..9cc02d3c43b 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-09 H.J. Lu * configure: Regenerated. diff --git a/libctf/configure b/libctf/configure index 3d2f22528d3..5e44eda194e 100755 --- a/libctf/configure +++ b/libctf/configure @@ -6720,7 +6720,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 @@ -11531,7 +11539,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 11542 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11637,7 +11645,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 11648 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 147ca03af57..c87a05d591a 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 H.J. Lu + + PR ld/27173 + * configure: Regenerated. + 2021-01-11 Kyrylo Tkachov * aarch64-asm-2.c: Regenerate. diff --git a/opcodes/configure b/opcodes/configure index 92b4b2247d6..e9f68df568a 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -6641,7 +6641,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 @@ -11452,7 +11460,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 11463 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11558,7 +11566,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 11569 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- 2.30.2