[Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format
ro at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 16 16:36:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502
Summary: collect2 LTO marker detection is fragile wrt. to nm
output format
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
When investigating why some users of GCC mainline on Solaris 2 saw more
LTO-related testsuite failures than I, it turned out that collect2 calls some
version of nm to search the object's symbol tables for __gnu_lto_v1.
Unfortunately, this relies on the output format produced by GNU nm -n, and
silently fails if the format is different (i.e. the LTO markers aren't found
and lto1 isn't called). I noticed this change between Solaris 10 (where I had
no instance of GNU nm in PATH, neither as nm nor as gnm) and Solaris 11 (where
there's /usr/bin/gnm in the default PATH).
This is very fragile, hard to find, and the requirement isn't even documented.
More information about the Gcc-bugs
mailing list