use simple-object instead of nm to determine if files contain LTO.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 23 Dec 2018 10:43:59 +0000 (10:43 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 23 Dec 2018 10:43:59 +0000 (10:43 +0000)
commit4098a6d4368119ad098028bf0888e17a16b9f022
treeffa042a1864822a16b8307e99a6930b3ff94855f
parent513825f06b561ceb7040f04fbf138a9e9c23a813
use simple-object instead of nm to determine if files contain LTO.

This replaces the use of nm to search for the LTO common symbol marker
and uses simple object to see if there's a section starting with
".gnu.lto_." or ".gnu.offload_lto_"

2018-12-23  Iain Sandoe  <iain@sandoe.co.uk>

* collect2.c (maybe_run_lto_and_relink): Don’t say we have a temp file
unless we actually did some LTO.
(has_lto_section, is_lto_object_file): New.
(maybe_lto_object_file): Remove.
(scan_prog_file): Use is_lto_object_file() instead of scanning the
output of nm.

From-SVN: r267371
gcc/ChangeLog
gcc/collect2.c