aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-01-11 16:26:39 -0800
committerArsen Arsenović <arsen@gcc.gnu.org>2023-08-07 22:59:37 +0200
commit9c7797a8c2d707ba4516d3d96d8dff6201476fb6 (patch)
tree3bb182275598b0c39d4d5f9520d538875b282e72 /libphobos
parent126f707efbb5184178701cbdc753a10fd831374e (diff)
downloadgcc-9c7797a8c2d707ba4516d3d96d8dff6201476fb6.zip
gcc-9c7797a8c2d707ba4516d3d96d8dff6201476fb6.tar.gz
gcc-9c7797a8c2d707ba4516d3d96d8dff6201476fb6.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. ChangeLog: * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libiberty/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
Diffstat (limited to 'libphobos')
-rwxr-xr-xlibphobos/configure14
1 files changed, 11 insertions, 3 deletions
diff --git a/libphobos/configure b/libphobos/configure
index ab611c8..7c453f5 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -6931,7 +6931,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
@@ -11797,7 +11805,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11800 "configure"
+#line 11808 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11903,7 +11911,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11906 "configure"
+#line 11914 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H