michael
2012-Dec-12 19:58 UTC
[LLVMdev] providing llvm gcc built-in function implementation...
Let me explain briefly my issue:
While working on my project ( OSX, llvh gcc 4.2), I run into the
compilation error:
"
..
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
generated:
"
.../src/sync.cpp:205: warning: new declaration 'bool
__sync_bool_compare_and_swap_16(volatile __uint128_t*, __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>,
<unnamed-unsigned:128>)'
"
I question is - what it the right way to add the implementation for builtin
function in llvm-gcc ?
Thanks,
Michael.
--
View this message in context:
http://llvm.1065342.n5.nabble.com/providing-llvm-gcc-built-in-function-implementation-tp52541.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
陳韋任 (Wei-Ren Chen)
2012-Dec-13 09:58 UTC
[LLVMdev] providing llvm gcc built-in function implementation...
Hi Michael, llvm-gcc is not supported anymore. Try to use dragonegg http://dragonegg.llvm.org/ HTH, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj