The build system enables intrinsics automatically for runtime detection even when the CPU USE flags are disabled. I'm compiling for an ARM chip with no FPU, but the package still builds NEON code that will never run. This is because the ebuild explicitly enables intrinsics when CPU flags are set, but it is never explicitly disabled leaving it up to automagic. Maybe related to bug #585776, but that seemed to be a problem specific to CFLAGS. Reproducible: Always Steps to Reproduce: 1. emerge -v media-libs/opus Actual Results: checking if compiler supports ARM Neon intrinsics... no checking if compiler supports ARM Neon intrinsics with -mfpu=neon -mfloat-abi=softfp... yes ... Intrinsics Optimizations: ...... ARM (NEON) Run-time CPU detection: ........ ARM (NEON Intrinsics) Expected Results: It should not waste time and space building code that will not run. LTO is also broken when compiling for this CPU when intrinsics are enabled. This fixes that, too. --- media-libs/opus/opus-1.3.1-r1.ebuild +++ media-libs/opus/opus-1.3.1-r1.ebuild @@ -25,6 +25,7 @@ $(use_enable custom-modes) $(use_enable doc) $(use_enable static-libs static) + --disable-intrinsics ) for i in ${INTRINSIC_FLAGS} ; do use ${i} && myeconfargs+=( --enable-intrinsics )
*** Bug 585776 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93253755df3984a0154319e605ef43c938124dfe commit 93253755df3984a0154319e605ef43c938124dfe Author: Sam James <sam@gentoo.org> AuthorDate: 2021-05-28 15:37:04 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2021-05-28 15:37:04 +0000 media-libs/opus: disable intrinsics automagic Thanks-to: David Michael <fedora.dm0@gmail.com> Closes: https://bugs.gentoo.org/752069 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org> media-libs/opus/opus-1.3.1-r1.ebuild | 4 ++- media-libs/opus/opus-1.3.1-r2.ebuild | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-)