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
flag-o-matic.eclass: simplify implementation and work in all cases #35959
Conversation
It curently uses some magic test to decide whether handcrafted code works with or without -latomic. But it can claim that -latomic is not needed for that case, while it is still needed for other cases. > okay so append-atomic-flags does not work for me in this case > noise-suppression-for-voice is doing `struct RnNoiseStats { uint32_t a, b, c, d; }; std::atomic<RnNoiseStats> m_stats;` > not just a single large integer It is simplest to always add -latomic when an ebuild gets that deep feeling that yeah, it would like some atomics please. The downsides to listing a linker library are exactly: - it might be unavailable - it might be unneeded And the former case is trivial to solve -- this function already does so -- while the latter case has a sanctioned approach that is already used for other intrinsic compiler libraries, but not for atomic "because the build system would have a hard time if we had to build atomic early on" which isn't a very good reason to break ebuilds which aren't building sys-devel/gcc. As a side benefit, we now handle -latomic such that a package which requires it, but only for parts of the installed package, does not overlink to libatomic in *all* binaries/libraries, even if the default LDFLAGS are overridden and the global -Wl,--as-needed disappears. Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 Bug: https://bugs.gentoo.org/820101 Bug: https://bugs.gentoo.org/925672 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Pull Request assignmentSubmitter: @eli-schwartz @gentoo/github Linked bugsNew packagesThis Pull Request appears to be introducing new packages only. Due to limited manpower, adding new packages is considered low priority. This does not mean that your Pull Request will not receive any attention, however, it might take quite some time for it to be reviewed. In the meantime, your new ebuild might find a home in the GURU project repository: the ebuild repository maintained collaboratively by Gentoo users. GURU offers your ebuild a place to be reviewed and improved by other Gentoo users, while making it easy for Gentoo users to install it and enjoy the software it adds. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Can you send it to the ML too (and cc toolchain@)? |
I think you can delete |
Apparently one person used it? |
Author: Matoro Mahri matoro@users.noreply.github.com |
Oops, forgot about that, was looking in eclasses only. |
Pull request CI reportReport generated at: 2024-03-28 05:17 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Merged in ec90f4c, thanks! |
It curently uses some magic test to decide whether handcrafted code works with or without -latomic. But it can claim that -latomic is not needed for that case, while it is still needed for other cases.
It is simplest to always add -latomic when an ebuild gets that deep feeling that yeah, it would like some atomics please. The downsides to listing a linker library are exactly:
And the former case is trivial to solve -- this function already does so -- while the latter case has a sanctioned approach that is already used for other intrinsic compiler libraries, but not for atomic "because the build system would have a hard time if we had to build atomic early on" which isn't a very good reason to break ebuilds which aren't building sys-devel/gcc.
As a side benefit, we now handle -latomic such that a package which requires it, but only for parts of the installed package, does not overlink to libatomic in all binaries/libraries, even if the default LDFLAGS are overridden and the global -Wl,--as-needed disappears.
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
Bug: https://bugs.gentoo.org/820101
Bug: https://bugs.gentoo.org/925672