[ct-ng] build error: undefined reference to `__sync_bool_compare_and_swap_4'

Brian Dessent brian@dessent.net
Tue Jun 17 00:30:00 GMT 2008

"Yann E. MORIN" wrote:

> I'm a bit short on time (as usual :-]), so any insights as to what is goin'
> amiss would be welcome! :-)

This looks like the old problem of the fact that the default instruction
set used by x86 gcc is that of the 386, the lowest common denominator. 
The atomic builtins only appeared on the 486 and later, so either gcc
needs to be configured --with-arch=486 or higher, or the file being
compiled needs to have -march=486 or higher in its CFLAGS.  Otherwise,
those builtins won't be available and you get the error as in $subject
when trying to build code that uses them.


For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list