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

fix: do not use LTS on mips64 and ppc64le #3557

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

henryiii
Copy link
Collaborator

Description

Fixes #3528. Using a nicer version of the patch Debian is applying with https://salsa.debian.org/science-team/pybind11/-/blob/master/debian/patches/drop_lto_on_some_archs.patch.

Suggested changelog entry:

* Avoid LTO on ppc64le and mips64.

_pybind11_return_if_cxx_and_linker_flags_work(
HAS_FLTO_THIN "-flto=thin${cxx_append}" "-flto=thin${linker_append}"
PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
endif()

if(NOT HAS_FLTO_THIN)
if(NOT HAS_FLTO_THIN AND NOT NO_FLTO_ARCH)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AND NOT NO...
Could IS_FLTO_ARCH work out more nicely here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly following the original patch 😳.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the reasoning was that this forces NO_FLTO, while IS_FLTO would not be accurate, it still might not be.

Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation!

@henryiii henryiii merged commit e50f841 into pybind:master Dec 21, 2021
@henryiii henryiii deleted the henryiii/fix/flto_arch branch December 21, 2021 20:42
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Dec 21, 2021
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Dec 28, 2021
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.

[BUG]: eigen3 3.4.0 inlining failing on ppc64el architecture: target specific option mismatch
2 participants