On Thu, Apr 17, 2014 at 11:38:18AM +0200, Paweł Sikora wrote:
> Hi,
> 
> the opt_random.h header includes <x86intrin.h> unconditionally and
> breaks crytopp build
> (redefinition of _mm_shuffle_epi8 in cpu.h).
> could you please add #ifdef __SSSE3__ around this include?

No, just fix cryptopp.
The *intrin.h headers have been redesigned to use #pragma GCC target,
so that they are usable regardless of the command line options used.
So, unlike in 4.8, you can
#include <x86intrin.h>
and similar headers and then have say
__attribute__((target ("ssse3"))) function which can use _mm_shuffle_epi8
and other SSSE3 intrinsics (similarly for lots of other ISA sets),
which wasn't possible before.

So, in this case you'd supposedly change the #ifdef to
#if !defined(__GNUC__) || defined(__SSSE3__) || (__GNUC__ > 4) || (__GNUC__ == 
4 && __GNUC_MINOR__ > 8) || defined(__INTEL_COMPILER)
or so.  Of course, you can use _mm_shuffle_epi8 only from functions
compiled within #pragma GCC target ("ssse3") (or anything higher)
or __attribute__((target ("ssse3"))).  If you don't, cryptopp
is even more buggy.

        Jakub

Reply via email to