diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-01-11 16:26:39 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-12 08:43:14 -0500 |
commit | 88d86e59701b3a747a55554baeb51369ae52bd18 (patch) | |
tree | 36117c56c47bf0fd868fa5a8fe3d4c97f1c50476 /newlib/libm | |
parent | d8d5dac0fe978d9b0eed3726b863d176809983cd (diff) | |
download | newlib-88d86e59701b3a747a55554baeb51369ae52bd18.zip newlib-88d86e59701b3a747a55554baeb51369ae52bd18.tar.gz newlib-88d86e59701b3a747a55554baeb51369ae52bd18.tar.bz2 |
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.
Diffstat (limited to 'newlib/libm')
-rwxr-xr-x | newlib/libm/configure | 14 | ||||
-rwxr-xr-x | newlib/libm/machine/configure | 14 | ||||
-rwxr-xr-x | newlib/libm/machine/i386/configure | 14 | ||||
-rwxr-xr-x | newlib/libm/machine/x86_64/configure | 14 |
4 files changed, 44 insertions, 12 deletions
diff --git a/newlib/libm/configure b/newlib/libm/configure index ee06ba8..db71022 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 2c119d4..97738e7 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 11ef841..d5d599f 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 828a231..b7e564d 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 |