GCC: Pass --plugin to AR and RANLIB
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jan 2021 14:43:11 +0000 (06:43 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Jan 2021 14:51:51 +0000 (06:51 -0800)
commit50ad1254d5030d0804cbf89c758359ae202e8d55
treed99205ba73874f43469734356f4f2d71ff8e428b
parenta9fd212a2416406f8503efe9e449718d0becfcb2
GCC: Pass --plugin to AR and RANLIB

Detect GCC LTO plugin.  Pass --plugin to AR and RANLIB to support LTO
build.

* 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/

* gcc-plugin.m4 (GCC_PLUGIN_OPTION): New.

libiberty/

* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
(configure_deps): Depend on ../config/gcc-plugin.m4.
* aclocal.m4: Include ../config/gcc-plugin.m4.
* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
RANLIB_PLUGIN_OPTION.
* configure: Regenerated.

zlib/

* configure: Regenerated.
15 files changed:
ChangeLog
Makefile.in
Makefile.tpl
config/ChangeLog
config/gcc-plugin.m4
configure
configure.ac
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/aclocal.m4
libiberty/configure
libiberty/configure.ac
libtool.m4
zlib/ChangeLog.bin-gdb
zlib/configure