Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536882 - sys-apps/portage: show a QA warning when -flto is used during building
Summary: sys-apps/portage: show a QA warning when -flto is used during building
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2015-01-17 18:05 UTC by Pacho Ramos
Modified: 2017-05-15 17:00 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 Pacho Ramos gentoo-dev 2015-01-17 18:05:13 UTC
Some upstream are starting to append -flto in some situations, then, it's easy to miss that if you don't look at the compile output (or it runs too fast). Maybe would be interesting to test for this "-flto" flag being used and show a warning in that case

Thanks
Comment 1 Zac Medico gentoo-dev 2015-01-17 19:55:14 UTC
We have a _check_build_log function that can be used to search the build log for things like this, inside pym/portage/package/ebuild/doebuild.py.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-17 20:48:47 UTC
I think we should do it as install-qa-check.d check instead. How about making this the first in-tree gentoo check?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-17 20:49:16 UTC
Oh wait, we can't ;). The spec doesn't officially give access to the build log, so grepping it is still portage-specific.
Comment 4 Zac Medico gentoo-dev 2015-01-17 20:57:28 UTC
(In reply to Michał Górny from comment #2)
> I think we should do it as install-qa-check.d check instead. How about
> making this the first in-tree gentoo check?

The nice thing about integrating it into the _check_build_log function is that we only have to read the build log once for all of the checks that it performs. Of course, we could integrate the "-flto" check into install-qa-check.d/90gcc-warnings, since that already reads the build log.

(In reply to Michał Górny from comment #3)
> Oh wait, we can't ;). The spec doesn't officially give access to the build
> log, so grepping it is still portage-specific.

Well, we support an in-tree build-log-qa-check.d directory, and ideally it would contain declarative config files, so that multiple checks done in a single pass of the build log.