Fails to build on x86-32 without yasm

Issue #92 resolved
Sebastian Ramacher created an issue

If yasm is not installed, a build on x86-32 fails with

cd /«PKGBUILDDIR»/obj-i586-linux-gnu/common && /usr/bin/c++   -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DX265_ARCH_X86=1 -D__STDC_LIMIT_MACROS=1 -g -O2 -fstack-
protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -I/«PKGBUILDDIR»/source/. -I/«PKGBUILDDIR»/source/common -I/«PKGBUILDDIR»/source/encoder
 -I/«PKGBUILDDIR»/obj-i586-linux-gnu    -Wall -Wextra -Wshadow -fPIC -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -o CMakeFiles/common.dir/pixe
l.cpp.o -c /«PKGBUILDDIR»/source/common/pixel.cpp
/«PKGBUILDDIR»/source/common/primitives.cpp: In function 'void x265_cpu_cpuid(uint32_t, uint32_t*, uint32_t*, uint32_t*, uint32_t*)':
/«PKGBUILDDIR»/source/common/primitives.cpp:190:54: error: inconsistent operand constraints in an 'asm'
                           : "0" (level), "2" (index));
                                                      ^
/«PKGBUILDDIR»/source/common/primitives.cpp:204:5: note: in expansion of macro '__cpuidex'
     __cpuidex(output, op, 0);
     ^
make[3]: *** [common/CMakeFiles/common.dir/primitives.cpp.o] Error 1

Comments (2)

  1. Steve Borho

    cmake: remove buggy workarounds for partial SIMD support (fixes #92)

    In the past, there were a number of primitives written in SIMD intrinsics that could work without compiling with YASM. Most of those are now gone, and we generally require YASM for SIMD support. This commit remoes support for using the few remaining SIMD intrinsics without having YASM to provide implementations of x265_emms(), x265_cpu_cpuid(), etc. Fixing a bug in the process.

    → <<cset d7b5e73fc91a>>

  2. Log in to comment