Eli Schwartz ec90f4c3a4 flag-o-matic.eclass: simplify implementation and work in all cases
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>
Signed-off-by: Sam James <sam@gentoo.org>
2024-03-29 18:45:05 +00:00
2024-03-28 04:20:57 +00:00
2024-03-24 22:17:32 +09:00
2024-03-29 15:28:22 +01:00
2024-03-29 09:50:58 +02:00
2024-03-29 10:37:59 -05:00
2024-03-16 00:58:55 +01:00
2024-03-27 04:49:46 +00:00
2024-03-28 07:18:49 -04:00
2024-03-17 23:36:28 +02:00
2024-03-29 10:38:00 -05:00
2024-03-22 17:22:42 +01:00
2024-03-28 08:09:01 +01:00
2024-03-24 16:24:35 +00:00
2024-03-21 16:35:45 +01:00
2024-03-23 08:28:58 +00:00
2024-03-29 09:39:55 +02:00
2024-03-26 20:59:26 +01:00
2024-03-17 07:46:25 +01:00
2024-03-29 09:37:04 -05:00
2024-03-28 08:41:50 +02:00
2024-03-28 10:05:28 -07:00
2024-03-25 10:35:08 +00:00
…
S
Description
No description provided
9.8 GiB
Languages
Shell 98%
Roff 1.3%
Emacs Lisp 0.2%
C 0.1%