My software build system's been using LTO for builds for years now. I append "-flto=thin -ffat-lto-objects -fuse-linker-plugin -Wl,--thinlto-jobs=8" to CFLAGS/CXXFLAGS and it worked nicely until 13-BETA1 (last tested one). Yesterday I updated to 13-BETA3, and same options now cause linker issues. Example for Make 4.3: http://s.verknowsys.com/a1b9805fa9c33b148d5ef8d479f3f47c.png (it also breaks with fat LTO enabled, not only with Thin) It builds fine if I just remove "-flto" option.
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