Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519120 - toolchain.eclass - allow -flto -fno-fat-lto-objects in C*FLAGS
Summary: toolchain.eclass - allow -flto -fno-fat-lto-objects in C*FLAGS
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2014-08-05 10:16 UTC by ytrezq
Modified: 2019-08-20 22:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ytrezq 2014-08-05 10:16:45 UTC
Recent gcc version improved lto support. I successfully build a stage2 cross-compiler with -fuse-linker-plugin -flto -fno-fat-lto-otjects --param lto-partitions=1 with crossdev (so shared libraries are disabled). I've seen great speeds/memory improvements for emerge.

This the matter of few replacements (ar by gcc-ar; ranlib by gcc-ranlib; nm by gcc-nm; stage 1 and 2 CFLAGS...).

Versions prior <4.8.2 have a bug that affect symbols in libraries and lto support should be disabled if the target version or the current gcc version is <4.8.2.

Currently, it take 1.5 Gb of RAM per --jobs=number for make. So checking the available RAM or reducing the number of make Jobs should be a requirement.


It seems there's some work for building a native compiler by this way as well as not using --disable-shared in the confgcc variable.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-13 22:54:36 UTC
Doesn't
    GCC_MAKE_TARGET=bootstrap-lto emerge -v1 gcc
do the right thing?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-20 22:41:17 UTC
USE=lto should pick lto-style bootstrap of gcc.