[llvm-bugs] [Bug 40045] New: lld regression: LTO references unused compiler builtins symbols, raising binary libgcc requirements

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 16 12:03:30 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=40045

            Bug ID: 40045
           Summary: lld regression: LTO references unused compiler
                    builtins symbols, raising binary libgcc requirements
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
                    peter at pcc.me.uk, ruiu at google.com

Hello! We've recently discovered a regression [1] in the downstream
rust-lang/rust project about how the rustc binary we're producing has a higher
binary version requirement than intended. We build in a super-old CentOS
container for a very low glibc (2.5) and libgcc binary requirement. When we
updated our build to use LLVM 7 to compile LLVM [2], however, we noticed that
our compiler required symbols like `__floatuntitf` with the symbol version
`GCC_4.3.0` which it didn't before. This in turn causes the compiler to be not
runnable on these old systems because libgcc doesn't have the symbols within.

Some bisection on our end has turned up [3] as the culprit. It looks like
that's injecting references to even unused symbols, which seems to be raising
our binary requirement. 

I've cc'd those on the diff for that, and I'm curious if y'all have thoughts on
this? Is it a bug in LLD that it's referencing these symbols in the final
binary when the binary itself doesn't need the symbols? Or is this a bug on our
end where we just shouldn't enable LTO (or more specifically, ThinLTO in our
case)


[1]: https://github.com/rust-lang/rust/issues/56849
[2]: https://github.com/rust-lang/rust/pull/55952
[3]: https://reviews.llvm.org/D50017

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181216/5ff8d154/attachment.html>


More information about the llvm-bugs mailing list