| Summary: | LTO seems to be broken in 13-BETA3 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | dmilith <dmilith> | ||||
| Component: | bin | Assignee: | Kubilay Kocak <koobs> | ||||
| Status: | Closed Overcome By Events | ||||||
| Severity: | Affects Some People | CC: | dim, kevans, lwhsu, toolchain | ||||
| Priority: | --- | Keywords: | needs-qa, regression | ||||
| Version: | 13.0-STABLE | Flags: | koobs:
mfc-stable13?
|
||||
| Hardware: | amd64 | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
dmilith
2021-02-20 10:10:51 UTC
I took a little bit of a look at this, and noted that lib/findprog-in.o -> lib/libgnu.a which does appear on the cut off part of the linker command that fails in the picture. AFAICT find_in_given_path does make the trip into libgnu.a, annotated like so:
define dso_local i8* @find_in_given_path(i8* %0, i8* %1, i1 zeroext %2) local_unnamed_addr #0 {
^4 = gv: (name: "find_in_given_path", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 1, canAutoHide: 0), insts: 119, calls: ((callee: ^9), (callee: ^5), (callee: ^8), (callee: ^3), (callee: ^13), (callee: ^11), (callee: ^2), (callee: ^6), (callee: ^10)), refs: (^14, ^15)))) ; guid = 1239841682990232801
Can you come up with an actual test case? Saying "it doesn't work for my application which I'm not giving any details about except a screenshot" is not very helpful... (In reply to Dimitry Andric from comment #2) This reproduces easily enough with devel/gmake (the port representation of what they're trying to build) and the listed CFLAGS/CXXFLAGS pushed into the port's Makefile It's not only gmake. Also db 6.2.23 fails with:
ld.lld: error: undefined symbol: __db_getulong
>>> referenced by db_load.c:1606 (/Software/Imagemagick/.src_7f0a4dfd9c5d9e10/db-6.2.23/build_unix/../util/db_load.c:1606)
>>> /User/.sofin/lto-cache/Thin-c858dd.tmp.o:(dbt_to_recno)
>>> referenced by db_load.c:1585 (/Software/Imagemagick/.src_7f0a4dfd9c5d9e10/db-6.2.23/build_unix/../util/db_load.c:1585)
>>> /User/.sofin/lto-cache/Thin-c858dd.tmp.o:(dbt_rrecno)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It's from 13.0-RC1
Created attachment 223592 [details] LTO error Attach image referenced in comment 0 so it doesn't link rot Can't reproduce anymore on 13-RC5 and 13.0-RELEASE :) ^Triage: - Correct resolution (FIXED is resolution by way of change (commit, usually)). Closing OBE unless resolving commit(s) are identified - Assign to committer resolving |