Intel® System Studio

__builtin_shuffle, GCC compatibility, and __has_builtin

I recently tried to build one of my projects (SIMDe) with ICC, and it failed due to __builtin_shuffle not being supported. There are ifdefs around the code in question which use __GNUC__ and __GNUC_MINOR__ to check for GCC ≥ 4.7 before using __builtin_shuffle, but ICC 18.0 masquerades as GCC 7 so the code was enabled.

System studio 2018: GXX_ROOT


In my linux host I have a g++ compiler created with crosstool-ng

This is the g++ I want icpc to use, not the default one. 

So I ran:

export GXX_ROOT=/my_toolchain/release/bin

export GXX_INCLUDE=/my_toolchain/release/x86_64-unknown-linux-gnu/include/c++/6.3.0

export SYSROOT= /my_toolchain/release/x86_64-unknown-linux-gnu/sysroot

export GNU_PREFIX=x86_64-unknown-linux-gnu-

The GXX_ROOT contains the g++ compiler:  x86_64-unknown-linux-gnu-g++

Subscribe to Intel® System Studio