Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 538604

Summary: sys-devel/binutils-6.1: ld gives large number of LTO remarks when used to link LLVM bytecode objects (LTO)
Product: Gentoo/Alt Reporter: Michael Weiser <michael>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: add option -verbose_lto_remarks to ld64 to conditionally enable LTO remarks output

Description Michael Weiser 2015-02-03 00:43:50 UTC
ld64-241.9 gives a huge number of LTO remarks on stderr (!) when link LLVM bytecode objects:

ld: LTO remark: <unknown>:0:0: system_error will not be inlined into main
ld: LTO remark: <unknown>:0:0: system_fatal too costly to inline (cost=5, threshold=1)
ld: LTO remark: <unknown>:0:0: system_fatal will not be inlined into main
ld: LTO remark: <unknown>:0:0: strip_file too costly to inline (cost=230, threshold=225)
ld: LTO remark: <unknown>:0:0: strip_file will not be inlined into main
ld: LTO remark: <unknown>:0:0: strip_file too costly to inline (cost=230, threshold=225)
ld: LTO remark: <unknown>:0:0: strip_file will not be inlined into main
ld: LTO remark: <unknown>:0:0: fatal can be inlined into main with cost=195 (threshold=337)

This can not be deactivated by the user. Example of linking ld64:

"/Users/michael/nobak/gentoo/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o ./strip.NEW -L../../ld64-241.9/src -L/Users/michael/nobak/gentoo/usr/lib/gcc/x86_64-apple-darwin14/4.2.1 ./strip.private.o -lprunetrie -lc++ -lSystem /Users/michael/nobak/gentoo/usr/bin/../lib/clang/3.5.1/lib/darwin/libclang_rt.osx.a -verbose_lto_remarks 2>&1 | wc -l
4274


Reproducible: Always
Comment 1 Michael Weiser 2015-02-03 00:44:44 UTC
Created attachment 395430 [details, diff]
add option -verbose_lto_remarks to ld64 to conditionally enable LTO remarks output
Comment 2 Fabian Groffen gentoo-dev 2015-02-04 17:33:35 UTC
Thanks, I applied the patch