aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-01-09 06:47:58 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-01-09 06:51:51 -0800
commita4966cd965cd7269426ea096113df862c1dcdf34 (patch)
tree909654e54daa47c9183eb1aecabcff7ba0ea2065 /binutils
parent50ad1254d5030d0804cbf89c758359ae202e8d55 (diff)
downloadbinutils-a4966cd965cd7269426ea096113df862c1dcdf34.zip
binutils-a4966cd965cd7269426ea096113df862c1dcdf34.tar.gz
binutils-a4966cd965cd7269426ea096113df862c1dcdf34.tar.bz2
Binutils: Pass --plugin to AR and RANLIB
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. libctf/ * configure: Regenerated. opcodes/ * configure: Regenerated.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rwxr-xr-xbinutils/configure27
2 files changed, 29 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d5eed5e..d401232 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure: Regenerated.
+
2021-01-09 Nick Clifton <nickc@redhat.com>
* configure: Regenerate.
diff --git a/binutils/configure b/binutils/configure
index f0d9876..f1b8064 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -6620,6 +6620,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+ plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+ if test x$plugin_so = x$plugin; then
+ plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+ fi
+ if test x$plugin_so != x$plugin; then
+ plugin_option="--plugin $plugin_so"
+ break
+ fi
+done
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6713,6 +6726,11 @@ else
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"
+ fi
+fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -6917,6 +6935,11 @@ else
fi
test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+fi
@@ -11546,7 +11569,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11549 "configure"
+#line 11572 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11652,7 +11675,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11655 "configure"
+#line 11678 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H