Closed JotaRandom closed 8 years ago
The problem is not with gcc 5.2, but rather that the Makefile is not passing the appropriate flags to gcc to allow the intrinsics to be made available. This is solvable by switching to a better build system, such as is in pull request #10
@jristz It looks as if you are trying to make a PKGBUILD for thor? DESTDIR is an autotools macro, so it's not going to do anything in the current thor build environment.
I managed to reproduce your errors when cross compiling for 32 bit (even more errors arise when compiling for 32 bit atom):
thor % CC="gcc -m32" make
gcc -m32 -std=c99 -g -O6 -Wall -pedantic -I common -c -o enc/encode_block.o enc/encode_block.c
In file included from common/simd.h:131:0,
from common/common_block.h:31,
from enc/write_bits.h:42,
from enc/encode_block.c:41:
common/simd/v128_intrinsics_x86.h: In function ‘v128_from_64’:
common/simd/v128_intrinsics_x86.h:50:24: warning: implicit declaration of function ‘_mm_cvtsi64_m64’ [-Wimplicit-function-declaration]
return _mm_set_epi64(_mm_cvtsi64_m64(a), _mm_cvtsi64_m64(b));
^
common/simd/v128_intrinsics_x86.h:50:24: error: incompatible type for argument 1 of ‘_mm_set_epi64’
In file included from common/simd/v64_intrinsics_x86.h:32:0,
from common/simd/v128_intrinsics_x86.h:32,
from common/simd.h:131,
from common/common_block.h:31,
from enc/write_bits.h:42,
from enc/encode_block.c:41:
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/emmintrin.h:591:1: note: expected ‘__m64 {aka __vector(2) int}’ but argument is of type ‘int’
_mm_set_epi64 (__m64 __q1, __m64 __q0)
^
In file included from common/simd.h:131:0,
from common/common_block.h:31,
from enc/write_bits.h:42,
from enc/encode_block.c:41:
common/simd/v128_intrinsics_x86.h:50:44: error: incompatible type for argument 2 of ‘_mm_set_epi64’
return _mm_set_epi64(_mm_cvtsi64_m64(a), _mm_cvtsi64_m64(b));
^
In file included from common/simd/v64_intrinsics_x86.h:32:0,
from common/simd/v128_intrinsics_x86.h:32,
from common/simd.h:131,
from common/common_block.h:31,
from enc/write_bits.h:42,
from enc/encode_block.c:41:
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/emmintrin.h:591:1: note: expected ‘__m64 {aka __vector(2) int}’ but argument is of type ‘int’
_mm_set_epi64 (__m64 __q1, __m64 __q0)
^
Makefile:69: recipe for target 'enc/encode_block.o' failed
make: *** [enc/encode_block.o] Error 1
It build with GCC 6.1 so for now is fixed.
The code fail to build in Linux with GCC 5.2
make option are the standard in ArchLinux
I test with
gcc --march=686 -mtune=generic -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer
without succes too and the same errors