[LLVMdev] Linking with OpenMP support

Marc de Kruijf dekruijf at cs.wisc.edu
Thu Feb 5 12:29:21 PST 2009


I'm trying to compile and link an x86 assembly file with OpenMP calls using
llvm-gcc 4.2.1 and I get the following errors:

/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(team.o):
In function `gomp_team_start':
(.text+0x15a): undefined reference to `__sync_bool_compare_and_swap_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(team.o):
In function `gomp_team_start':
(.text+0x192): undefined reference to `__sync_lock_test_and_set_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(team.o):
In function `gomp_team_start':
(.text+0x31f): undefined reference to `__sync_bool_compare_and_swap_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(team.o):
In function `gomp_team_start':
(.text+0x357): undefined reference to `__sync_lock_test_and_set_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(team.o):
In function `gomp_team_end':
(.text+0x48d): undefined reference to `__sync_bool_compare_and_swap_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(mutex.o):
In function `gomp_mutex_lock_slow':
(.text+0x20): undefined reference to `__sync_val_compare_and_swap_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(mutex.o):
In function `gomp_mutex_lock_slow':
(.text+0x4e): undefined reference to `__sync_bool_compare_and_swap_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(bar.o):
In function `gomp_barrier_wait_end':
(.text+0x2e): undefined reference to `__sync_lock_test_and_set_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(bar.o):
In function `gomp_barrier_wait_end':
(.text+0x6c): undefined reference to `__sync_add_and_fetch_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(bar.o):
In function `gomp_barrier_wait_end':
(.text+0x83): undefined reference to `__sync_lock_test_and_set_4'
/afs/
cs.wisc.edu/p/vertical/tools/llvm-gcc-4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../libgomp.a(bar.o):
In function `gomp_barrier_wait':
(.text+0xde): undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status

I don't get this problem when using gcc 4.2.1.  I this not supported then?
Any ideas?

Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090205/36e289b3/attachment.html>


More information about the llvm-dev mailing list