undefined reference to `__sync_lock_test_and_set_4'

undefined reference to `__sync_lock_test_and_set_4'

Hi all,
I'm using the Intel STM Compiler 3.0 to build the following simple C++ file:
static int volatile l;
int main ()
return 0;

icc synctest.cpp -o synctest

Results in the following errors:
synctest.cpp:(.text+0x33): undefined reference to `__sync_lock_test_and_set_4'
synctest.cpp:(.text+0x3d): undefined reference to `__sync_lock_release_4'
synctest.cpp:(.text+0x4c): undefined reference to `__sync_add_and_fetch_4'
synctest.cpp:(.text+0x61): undefined reference to `__sync_bool_compare_and_swap_4'

I've gotten these errors before when I was using g++, and I simply added -march=i686 to fix them. However, that is not working in this case. Can anyone give me any advice on how to get these sync primitives working? The documentation here: http://www.intel.com/software/products/compilers/docs/clin/main_cls/inde... claims these functions are supported.

Here is my full Icc version:
Intel C STM Intel 64 Compiler Professional for applications running on Intel 64, Prototype Edition 3.0 Build 20081204 Package ID: l_cproc_p_11.0.606

System is an Xeon E5405

Thanks! (Sorry if this is in the wrong place.)

3 帖子 / 0 全新

Also, this code build and runs with the intel C++ compiler 11.1 064.

STM Compiler 3.0 does not support the __sync__ .. since it is based on earlier version of 11.0, before the __sync_ intrinsic support was added to 11.0