Created attachment 570946 [details, diff] [PATCH] Allow asm if pic is disabled Currently the code is: ---SNIPPET 1--- IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test" ... x265_variant_src_configure() { ... local mycmakeargs=( "${myabicmakeargs[@]}" ) case "${MULTIBUILD_VARIANT}" in "main12") mycmakeargs+=( -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON ) if [[ ${ABI} = x86 ]] ; then mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) fi ... "main10") mycmakeargs+=( -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF ) if [[ ${ABI} = x86 ]] ; then mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) fi ---SNIPPET 1--- Then further down the ebuild: ---SNIPPET 2--- multilib_src_configure() { ... if [[ ${ABI} = x86 ]] ; then # Bug #528202 if use pic ; then ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it." myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF ) fi ---SNIPPET 2--- SNIPPET 1 does what should only _conditionally_ happen in SNIPPET 2. SNIPPET 2 is repetitive in this instance. -DENABLE_ASSEMBLY=OFF is already set, whether USE pic is on or off. I have attached a patch which addresses this. Current behaviour: On x86, optimized assembly code is always disabled, regardless of pic USE flag. Correct behaviour: On x86, optimized assembly code should always be enabled unless pic USE flag is enabled. This looks like copypasta error. This isn't critical but should be addressed so I'm marking this as "minor." If this is "trivial" or "enhancement" please change accordingly.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eba596db8a926adb18595549c89294ed0a1e929e commit eba596db8a926adb18595549c89294ed0a1e929e Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-05-24 15:07:04 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-05-24 20:23:50 +0000 media-libs/x265: rework assembly support Closes: https://bugs.gentoo.org/681878 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> media-libs/x265/metadata.xml | 1 + media-libs/x265/x265-3.3.ebuild | 66 ++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 33 deletions(-)