Let me explain briefly my issue:
While working on my project ( OSX, llvh gcc 4.2), I run into the
Undefined symbols for architecture x86_64:
___sync_bool_compare_and_swap_16", referenced from:
I decided that the function is declared, but not implemented for uint128_t.
So, I implemented the function, and the code is working correctly.
But the only way I manage to make the linker to find the function, and to
build the code is to declare my function as:
extern "C" bool __sync_bool_compare_and_swap_16(volatile __uint128_t *
destination, __uint128_t comperand, __uint128_t exchange)
Though the code is linked and is working properly, the warnings are
.../src/sync.cpp:205: warning: new declaration 'bool
__sync_bool_compare_and_swap_16(volatile __uint128_t*, __uint128_t,
...l/src/sync.cpp:205: warning: ambiguates built-in declaration 'bool
__sync_bool_compare_and_swap_16(volatile void*, <unnamed-unsigned:128>,
I question is - what it the right way to add the implementation for builtin
function in llvm-gcc ?