I'm trying to build media-libs/x264 on a e5500 system, which does not have altivec. However, the ebuild does not respect USE="-altivec". Reproducible: Always Steps to Reproduce: 1.Try to emerge media-libs/x264 on a PPC64 system with "-mcpu=e5500" in CFLAGS and "-altivec" in USE 2. 3. Actual Results: Configure fails due to -mabi=altivec being enforced even though it is not supported. Expected Results: The package is configured and built without altivec specific code (--no-asm).
Created attachment 470380 [details, diff] Proposed patch
Created attachment 470382 [details] Output from emerge --info
do you have a build log ? iirc x264 was using runtime cpu detection for altivec and building only altivec files with mabi=altivec which should work on any ppc
Created attachment 470712 [details] Complete build log Sure, although it's not that fascinating. The reason for "No working C compiler found." is that gcc gives the error "error: AltiVec not supported in this target" due to the combination of the flags "-mcpu=e5500" (from make.conf) and "-maltivec" (added by the configure script unless "--disable-asm" is specified).
Indeed, your patch seems correct, thanks! commit 957db0b234d928bb48a8890f78b2bd6332ebc8f8 Author: Alexis Ballier <aballier@gentoo.org> Date: Sun Apr 23 16:23:09 2017 +0200 media-libs/x264: Add altivec useflag and disable ppc asm if not enabled, since ppc asm is what that means. Bug #616004. Patch by Marcus Comstedt