This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is __sync_bool_compare_and_swap a builtin function in gcc?


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).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]