InBetweenNames / gentooLTO

A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
GNU General Public License v2.0
570 stars 97 forks source link

net-news/newsboat-2.16.1 fails to link without -ffat-lto-objects #376

Open rsclifford opened 5 years ago

rsclifford commented 5 years ago

Previous versions of newsboat have built just fine with GentooLTO's optimizations, but 2.16.1 fails to link. Adding >=net-news/newsboat-2.16.1 *FLAGS+=-ffat-lto-objects to ltoworkarounds.conf makes it build.

My emerge-info.txt

The build log (without -ffat-lto-objects)

InBetweenNames commented 5 years ago

Ah yes, it looks like a Rust package with some C++ parts. Since Rust is built on LLVM, it makes sense why this is unable to link with LTO. I'll see if it builds with Clang.

InBetweenNames commented 5 years ago

Indeed, it builds with Clang and ThinLTO. I'm going to leave this issue open as I think it's about time we start considering per-package Clang workarounds for Rust. As it stands, GCC and LLVM can't LTO across each others boundaries since they use fundamentally different IRs, so for packages that mix languages it's probably best to keep it all to the same compiler framework.

InBetweenNames commented 5 years ago

Quick hack for now, in case anyone wants to test:

net-news/newsboat CC=clang CXX=clang++ USE_NONGNU=1 *FLAGS-="-malign-data*" *FLAGS+="-flto=thin" RUSTFLAGS="-C codegen-units=${NTHREADS} -Z thinlto"
barolo commented 4 years ago

Quick hack for now, in case anyone wants to test:

net-news/newsboat CC=clang CXX=clang++ USE_NONGNU=1 *FLAGS-="-malign-data*" *FLAGS+="-flto=thin" RUSTFLAGS="-C codegen-units=${NTHREADS} -Z thinlto"

There's increasing amount of Rust/Clang stuff appearing [also Go, ( eww... ) and had case of Elixir], for now per package workaround isn't too much of a hassle, but fixing it globally is inevitable

Titaniumtown commented 3 years ago

This issue should be closed, -ffat-lto-objects is no longer needed to link newsboat.