pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: graphics/py-Pillow fails to build on 7.0 unless gcc is 4.9+



> Looking at libImaging/ImagingUtils.h:40:
> 
> /* This is to work around a bug in GCC prior 4.9 in 64 bit mode.
>   GCC generates code with partial dependency which is 3 times slower.
>   See: http://stackoverflow.com/a/26588074/253146 */
> #if defined(__x86_64__) && defined(__SSE__) &&  ! defined(__NO_INLINE__) && \
>    ! defined(__clang__) && defined(GCC_VERSION) && (GCC_VERSION < 40900)
> static float __attribute__((always_inline)) inline _i2f(int v) {
>    float x;
>    __asm__("xorps %0, %0; cvtsi2ss %1, %0" : "=X"(x) : "r"(v) );
>    return x;
> }
> #else
> static float inline _i2f(int v) { return (float) v; }
> #endif
> 
> It seems the workaround is also wrong... I'm just going to try gcc 4.9.
> 
> GCC_REQD+=      4.9
> 
> makes it build.

Or disable the hack completely. Then GCC <4.9 would supposedly produce worse code.

Which one is better? :-)

Kind regards,
Adam


Home | Main Index | Thread Index | Old Index