[binutils-gdb] binuitils: Check if AR is usable for LTO build
H.J. Lu
hjl@sourceware.org
Tue Jan 12 00:38:18 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=44124a46839b3563e448edfd013c6faa6a8b1642
commit 44124a46839b3563e448edfd013c6faa6a8b1642
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 11 16:37:03 2021 -0800
binuitils: Check if AR is usable for LTO build
Check if AR is usable for LTO build with --enable-pgo-build=lto:
checking for -plugin option... ar: no operation specified
Failed: ar --plugin /usr/gcc-11.0.0-x32/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.so rc
no
configure: error: AR with --plugin and rc is required for LTO build
instead of build failure later.
PR binutils/26766
* configure.ac:
* configure: Regenerated.
Diff:
---
ChangeLog | 6 ++++++
configure | 4 ++++
configure.ac | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 81593bc8f85..b9255d643cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/26766
+ * configure.ac:
+ * configure: Regenerated.
+
2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/27173
diff --git a/configure b/configure
index 5437ef12c72..25d2fc48c66 100755
--- a/configure
+++ b/configure
@@ -10241,6 +10241,10 @@ if test -n "$PLUGIN_OPTION"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
+else
+ if test "$enable_pgo_build" != "no"; then
+ as_fn_error $? "AR with --plugin and rc is required for LTO build" "$LINENO" 5
+ fi
fi
diff --git a/configure.ac b/configure.ac
index 9dd51c36e5a..d39019d7093 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3452,6 +3452,10 @@ if test -n "$PLUGIN_OPTION"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
+else
+ if test "$enable_pgo_build" != "no"; then
+ AC_MSG_ERROR([AR with --plugin and rc is required for LTO build])
+ fi
fi
AC_SUBST(AR_PLUGIN_OPTION)
AC_SUBST(RANLIB_PLUGIN_OPTION)
More information about the Binutils-cvs
mailing list