On Tue, Jul 05, 2016 at 07:46:10PM +0200, Riccardo Mottola wrote: > Hi Lennart, > > Lennart Sorensen wrote: > >On Sat, Jul 02, 2016 at 08:57:56AM +0200, Riccardo Mottola wrote: > >>I what test program could I use? I noticed that e.g. Firefox (which works) > >>is not linked against it. > >You could try forcing altivec off in libjpegturbo by setting the environment: > > > >export JSIMD_FORCENONE=1 > > that works! Once set, the application loads several JPG files without > issues.
So it turns out libjpeg-turbo has NO runtime detection on powerpc and just assumes altivec is valid. This untested patch might work: --- simd/jsimd_powerpc.c.orig 2016-07-05 14:57:48.305763762 -0400 +++ simd/jsimd_powerpc.c 2016-07-05 14:58:04.453763762 -0400 @@ -32,7 +32,10 @@ if (simd_support != ~0U) return; - simd_support = JSIMD_ALTIVEC; + if (__builtin_cpu_supports("altivec")) + simd_support = JSIMD_ALTIVEC; + else + simd_support = 0; /* Force different settings through environment variables */ env = getenv("JSIMD_FORCENONE"); -- Len Sorensen