Don't call lto-wrapper for ar and ranlib 02/257602/1 accepted/tizen/6.5/base/tool/20211027.112442 accepted/tizen/base/tool/20210503.092848 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.200501 submit/tizen_base/20210430.035409 tizen_6.5.m2_release
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 25 Feb 2020 11:30:33 +0000 (03:30 -0800)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 28 Apr 2021 05:29:24 +0000 (14:29 +0900)
commitaf767f7d29fc14c4955c5bef2f218ce3e53b61c9
tree63e2884bbed63c19da44f995c8e2222451657d0f
parentfd079ebd2f64f23b9dd7bf083a151d07f2a90707
Don't call lto-wrapper for ar and ranlib

Since ar and ranlib don't need to know symbol types to work properly,
we should avoid calling lto-wrapper for them to speed them up.

bfd/

PR binutils/25584
* plugin.c (need_lto_wrapper_p): New.
(bfd_plugin_set_program_name): Add an int argument to set
need_lto_wrapper_p.
(get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
set.
* plugin.h (bfd_plugin_set_program_name): Add an int argument.

binutils/

PR binutils/25584
* ar.c (main): Pass 0 to bfd_plugin_set_program_name.
* nm.c (main): Pass 1 to bfd_plugin_set_program_name.

(cherry picked from commit ecda90163e2b0a6f0be96e3fc262c28820a27211)

Change-Id: I2110670d62156392eae11af1b51b03870b6715f7
bfd/ChangeLog
bfd/plugin.c
bfd/plugin.h
binutils/ChangeLog
binutils/ar.c
binutils/nm.c