Displaying 2 results from an estimated 2 matches for "cc6t7jao".
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...o compile some simple example
programs with llvm-g++ instead of g++ but this does not work as I had hoped
(at least not on x86). A mutex-based programs works fine (but is
substantially slower than gcc) but my wait-free alternative fails with:
$ llvm-g++ -O3 -lpthread waitfree.c -o waitfree
/tmp/cc6t7jaO.o: In function `inc_count(void*)':
(.text+0x2ee): undefined reference to `__sync_add_and_fetch_4'
collect2: ld returned 1 exit status
The source is:
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define NUM_THREADS 9
#define TCOU...
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
...> programs with llvm-g++ instead of g++ but this does not work as I had hoped
> (at least not on x86). A mutex-based programs works fine (but is
> substantially slower than gcc) but my wait-free alternative fails with:
>
> $ llvm-g++ -O3 -lpthread waitfree.c -o waitfree
> /tmp/cc6t7jaO.o: In function `inc_count(void*)':
> (.text+0x2ee): undefined reference to `__sync_add_and_fetch_4'
> collect2: ld returned 1 exit status
This probably means that you're target triple starts with i386, where
__sync instructions aren't supported, possibly reconfiguring llvm-g...