[PATCH 1/2] Sync with binutils: GCC: Pass --plugin to AR and RANLIB

Jeff Law jeffreyalaw@gmail.com
Tue Nov 23 00:29:04 GMT 2021



On 11/13/2021 9:33 AM, H.J. Lu via Gcc-patches wrote:
> Sync with binutils for building binutils with LTO:
>
>  From 50ad1254d5030d0804cbf89c758359ae202e8d55 Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Sat, 9 Jan 2021 06:43:11 -0800
> Subject: [PATCH] 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.
> 	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
> 	RANLIB_PLUGIN_OPTION.
> 	* aclocal.m4: Regenerated.
> 	* configure: Likewise.
>
> zlib/
>
> 	* configure: Regenerated.
I thought the plugins were automatically loaded if they're in the right 
place in the filesystem.  Wouldn't that make this patch unnecessary?  Am 
I missing something?

jeff



More information about the Gcc-patches mailing list