Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround cleanup #3

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open

Workaround cleanup #3

wants to merge 63 commits into from

Conversation

jhatler
Copy link
Owner

@jhatler jhatler commented Dec 26, 2023

This cleans up the workarounds which have accumulated over time.

The work of neeshy in InBetweenNames#883 and the details of InBetweenNames#859 were incorporated into this PR.

Then, all of the remaining workarounds were moved to package.cflags files prefixed with untested- and commented. A new version of ltoize (0.10.0) was created which installed the prefixed and non-prefixed files.

From here, this PR will need incrementally updated as things are tested. Commented workaround which are found to be unneeded should be delete. Workarounds still needed should be tested locally, and then moved to the unprefixed files. This workflow will allow the untested- files to act as a backlog of what still needs tested.

This removes workarounds for packages which are not present in the
portage tree. It also updates the names of some packages which have
been renamed.

This is based on the upstream issue referenced below.

Refs: InBetweenNames#859
Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the workarounds verified by neeshy to be unnecessary. See
neeshy's comments reference in the below issue for more context.

Refs: InBetweenNames#883
Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The GentooLTO project has not gone through the effort of testing all
of the workarounds it's accumulated over the years.  This commit renames
all of the .cflags files to be prefixed with untested- so that users
know that they are not tested and may not be needed. It also adds a new
version of the ltoize rebuild (0.10.0) that uses the new files.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This recreates the original package.cflags files to hold workarounds
which have been tested and deemed safe and necessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This comments all untested workarounds. This will make it easier to see
which are needed and incrementatlly enable them. Once tested, they can
be moved to the un-prefixed package.cflags files.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This updated the make.conf.lto file to enable the pgo and lto USE flags
by default.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This makes the override-flagomatic flag enabled in the ebuild by
default, without changing the default behavior. This was done by adding
LTO_ENABLE_FLAGOMATIC=yes to make.conf.lto. This allows the user to now
use the flag-o-matic.conf file to disable flagomatic instead of using it
to enable it.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
sys-devel/binutils handles its own LTO, so we need to disable the flags
we add ourselves for it.

Graphite and ipa-pta are tested to work, but flag-o-matic needs disabled
for them to be applied.

devirtualize-at-ltrans breaks the tests.
no-semantic-interposition breaks the tests.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The symlink was incorrectly named wflag-o-matic.conf.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This was tested to be unneeded, all python tests passed.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The gold linker has not be recommended for use with GentooLTO for some
time. This removes the workarounds for it.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This was built without the workaround and tested to work correctly.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
No isues were encountered when building this without the workarounds.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
No issues were encountered building this without workarounds.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The no-common workarounds were primarily needed for GCC 9. Reviewing
the GentooLTO issue tracker, and GentooLTO#484 in particular, it seems
that GCC 10 and binutils 2.34 have resolved the issues. This commit
removes the no-common workarounds and the keep-nocommon USE flag.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
It appears that the tls-dialect setting in GCC has very little testing
and is not used very much. This removes the workarounds for it and I'll
not be supporting it in the future.

RefS: https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg170586.html
Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the prelink support from this project. It seems to have few
users left and is not worth the effort to maintain.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the support and workarounds for the no-plt flag. Usage
of the flag interferes with lazy binding and doesn't seem to be worth
the effort to maintain.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
As of Python 3.12, the gentoo repo supports both an LTO and PGO flag.
Maintaining a distinct python package in this repo is no longer
necessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The packages removed in this commit are no longer present in the gentoo
tree, so the workarounds are no longer needed.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This adds a header to each untested file that lists the number of
workarounds in it which have yet to be tested.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the portage-bashrc-mv workarounds because they were only
needed to resolve a failure in dev-util/colm which has been addressed
upstream as of 0.14.7.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This enables the no-semantic-interposition workaround for umockdev now
that it has been tested as still being necessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
app-crypt/gcr has been tested to work with LTO but semantic
interposition must be disable.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This has been tested to no longer be necessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
Ruby was built with LTO and -Werror=strict-aliasing which validates that
no workarounds are needed for it.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
spidermonkey has been tested to build find with ipa-pta and LTO enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the -Ofast workaround and adds one for LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The workaround has been tested to be unnecessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the -fno-finite-math-only workaround and adds one for LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the ipa-pta workaround for ffmpeg and adds one to disable
LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the no-semantic-interposition and and -fno-finite-math
workarounds. It adds a workaround to disable ipa-pta, which breaks the
llvm tests.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
These have been tested to be unnecessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This has been tested to be unnecessary.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This updates the counts of untested workarounds in the file headers.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This adds the below flags to the LTO_WARNING_FLAGS variable and adds
it to CFLAGS by default. These flags are from the Gentoo wiki. If a
package fails to compile with these flags, LTO should not be used.

- -Werror=odr
- -Werror=lto-type-mismatch
- -Werror=strict-aliasing

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This has been tested to be incompatible with LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The package has been tested to compile fine with LTO, but the tests fail
when -Werror=lto-type-mismatch is enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails its tests when the -Werror=odr flag is used.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile with LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The package compiles fine with LTO but the tests fail with
strict-aliasing enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile with LTO enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile with LTO enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile with LTO enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to pass its tests when LTO is enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile and pass its test with LTO or -O3.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The latest workarounds were not added in alphabetized order.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This adds a patch from Fedora and the necessary workarounds to compile
libtool with LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to compile with LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package fails to pass its tests when graphite optimizations are
enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This package causes downstream tests to fail with ipa-pta is enabled.
Its own tests fail with -O3 is used.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The workaround for gcr had the version appended accidentally. This was
removed.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
There were some leftover configurations in the ltoize ebuild that were
not removed when the no-common workarounds were removed. This commit
removes those leftover configurations.

Refs: b0cd07c
Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The bluez package fails its tests when built with LTO.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
LLVM 17 fails to pass its tests when built with LTO by gcc.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
This removes the workarounds for llvm because they were encountered with
gcc and this repo isn't supporting building llvm with gcc.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
The gentoo tree moved some packages from sys-devel to dev-build. This
updates the configurations in this repo to reflect that change.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
gpm fails to build with lto.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
abseil-cpp needed lto and ipa-pta flags to be disabled for builds
to succeed.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
Tests fail when lto is enabled.

Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant