aboutsummaryrefslogtreecommitdiff
path: root/zlib/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-01-11 16:26:39 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-01-11 16:26:51 -0800
commit03c02f3116d75721f917c4155cefb18b940a43ff (patch)
tree36b5214bc5a69ce1860aef06581430a57ee9d063 /zlib/configure
parenteabdd87b2e8d20941d8bfe0b668d6ae4e5dd737f (diff)
downloadbinutils-03c02f3116d75721f917c4155cefb18b940a43ff.zip
binutils-03c02f3116d75721f917c4155cefb18b940a43ff.tar.gz
binutils-03c02f3116d75721f917c4155cefb18b940a43ff.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 'zlib/configure')
-rwxr-xr-xzlib/configure14
1 files changed, 11 insertions, 3 deletions
diff --git a/zlib/configure b/zlib/configure
index 79a79c5..695819c 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -5515,7 +5515,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
@@ -10657,7 +10665,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10660 "configure"
+#line 10668 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10763,7 +10771,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10766 "configure"
+#line 10774 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H