It's a matter of providing BINARY_PACKAGE_BUILD. I checked that it works by: - checking that vzeroupper instruction is used in libdarktable.so (seems to come from avx), - and is absent with this flag being disabled. It's on by default as CPU detection is the current and default behaviour. I'm not sure if there's a better USE flag. Either this, maybe bindist?
Created attachment 587886 [details, diff] Add the new USE flag.
please add a more detailed explanation, what the flag does.
During building, darktable normally does autodetection of CPU features for an optimized build. However, it is not suitable for distributable binary packages (e.g. Sabayon ones, or plain Portage binpkgs). I've encountered a case (Sabayon bug 5817) that the build server built it with AVX features, but user's CPU lacked that, causing the application to crash with SIGILL. So this flag allows to build a generic package. Most people want an optimized build, so my patch makes optimized one by default.
Personally, I really do not think darktable ebuilds should mess with this at all. It is up to the user to set their compiler flags the way THEY want! Will work on removing this logic soon. Note to self: this affects all ebuilds we have in the tree, including the live one as of now.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba35b96b501f53471cc61bdc9d518b1f48d17ef7 commit ba35b96b501f53471cc61bdc9d518b1f48d17ef7 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2020-06-18 16:26:54 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2020-06-18 16:29:21 +0000 media-gfx/darktable: prevent CMake from overriding march and mtune Closes: https://bugs.gentoo.org/692786 Signed-off-by: Marek Szuba <marecki@gentoo.org> media-gfx/darktable/darktable-3.0.2-r1.ebuild | 1 + ...darktable-3.0.2_cmake-march-autodetection.patch | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+)