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: unassig...@gcc.gnu.org ReportedBy: r...@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.