diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-11-13 06:11:41 -0800 |
---|---|---|
committer | Arsen Arsenović <arsen@gcc.gnu.org> | 2023-08-07 22:59:36 +0200 |
commit | 126f707efbb5184178701cbdc753a10fd831374e (patch) | |
tree | 052a59070b171198ea6b8f5dae7e4084aedd436d /libvtv | |
parent | 432c6f05b00702303730b212c14f364b263ba4b1 (diff) | |
download | gcc-126f707efbb5184178701cbdc753a10fd831374e.zip gcc-126f707efbb5184178701cbdc753a10fd831374e.tar.gz gcc-126f707efbb5184178701cbdc753a10fd831374e.tar.bz2 |
Sync with binutils: GCC: Pass --plugin to AR and RANLIB
Sync with binutils for building binutils with LTO:
50ad1254d50 GCC: Pass --plugin to AR and RANLIB
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO
build.
ChangeLog:
* Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@
(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
* configure.ac: Include config/gcc-plugin.m4.
AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION.
* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and
RANLIB if possible.
* Makefile.in: Regenerated.
* configure: Likewise.
config/ChangeLog:
* gcc-plugin.m4 (GCC_PLUGIN_OPTION): New.
libiberty/ChangeLog:
* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
(configure_deps): Depend on ../config/gcc-plugin.m4.
* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
RANLIB_PLUGIN_OPTION.
* aclocal.m4: Regenerated.
* configure: Likewise.
zlib/ChangeLog:
* configure: Regenerated.
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.
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.
Diffstat (limited to 'libvtv')
-rwxr-xr-x | libvtv/configure | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/libvtv/configure b/libvtv/configure index e7e490d..5f8e2bd 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -7327,6 +7327,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 @@ -7420,6 +7433,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 @@ -7624,6 +7642,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 @@ -12278,7 +12301,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12281 "configure" +#line 12304 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12384,7 +12407,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12387 "configure" +#line 12410 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |