Re: is __sync_bool_compare_and_swap a builtin function in gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 10-5-23 下午9:46, Marc Glisse wrote:
> On Sun, 23 May 2010, Da Zheng wrote:
> 
>> da-zhengs-macbook:tmp dazheng$ gcc -o test test.c
>> Undefined symbols:
>>  "___sync_val_compare_and_swap_4", referenced from:
>>      _main in ccyxRK5Y.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>>
>> I use macbook and it has Intel Dual core. My GCC version is 4.4.1.
>> Could anyone
>> tell me why __sync_val_compare_and_swap cannot be used. Thank you.
> 
> You probably need an appropriate -march flag (386, which the compiler
> may target by default, doesn't have the instructions).
Thanks. It works. I thought GCC could choose a right architecture automatically.

Zheng Da

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux