<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - mesa fails to check for gcc atomic primitives before using them"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93089">93089</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>mesa fails to check for gcc atomic primitives before using them
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>OpenBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jsg@openbsd.org
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>The u_atomic.h macros assume the gcc atomic builtins are always available but
this is only the case on linux with the way the linux kernel fakes atomics when
the architecture does not provide them.
This concerns at least sparc < v9, hppa, sh, arm < v6, alpha and mips64.
mips64
undefined reference to `__sync_val_compare_and_swap_1'
alpha
undefined reference to `__sync_val_compare_and_swap_1'
i386 (should be avoidable with -march=i586 for cx8)
undefined symbol '__sync_val_compare_and_swap_8'
arm v4 abi
/tmp//ccIl4d4c.o: In function `test_atomic_assign_int':
u_atomic_test.c:(.text+0x78): undefined reference to
`__sync_val_compare_and_swap_4'
u_atomic_test.c:(.text+0xd4): undefined reference to
`__sync_val_compare_and_swap_4'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_int':
u_atomic_test.c:(.text+0x170): undefined reference to `__sync_add_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_int':
u_atomic_test.c:(.text+0x1dc): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x240): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x2ac): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x318): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x350): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x3b4): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x3ec): undefined reference to `__sync_sub_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_unsigned':
u_atomic_test.c:(.text+0x4f4): undefined reference to
`__sync_val_compare_and_swap_4'
u_atomic_test.c:(.text+0x550): undefined reference to
`__sync_val_compare_and_swap_4'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_unsigned':
u_atomic_test.c:(.text+0x5ec): undefined reference to `__sync_add_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_unsigned':
u_atomic_test.c:(.text+0x658): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x6bc): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x728): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x794): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x7cc): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x830): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x868): undefined reference to `__sync_sub_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_int16_t':
u_atomic_test.c:(.text+0x978): undefined reference to
`__sync_val_compare_and_swap_2'
u_atomic_test.c:(.text+0x9dc): undefined reference to
`__sync_val_compare_and_swap_2'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_int16_t':
u_atomic_test.c:(.text+0xa7c): undefined reference to `__sync_add_and_fetch_2'
/tmp//ccIl4d4c.o: In function `test_atomic_int16_t':
u_atomic_test.c:(.text+0xae8): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0xb54): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0xbc0): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0xc34): undefined reference to `__sync_add_and_fetch_2'
u_atomic_test.c:(.text+0xc6c): undefined reference to `__sync_add_and_fetch_2'
u_atomic_test.c:(.text+0xcd8): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0xd18): undefined reference to `__sync_sub_and_fetch_2'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_uint16_t':
u_atomic_test.c:(.text+0xe38): undefined reference to
`__sync_val_compare_and_swap_2'
u_atomic_test.c:(.text+0xe9c): undefined reference to
`__sync_val_compare_and_swap_2'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_uint16_t':
u_atomic_test.c:(.text+0xf40): undefined reference to `__sync_add_and_fetch_2'
/tmp//ccIl4d4c.o: In function `test_atomic_uint16_t':
u_atomic_test.c:(.text+0xfac): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0x1010): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0x107c): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0x10ec): undefined reference to `__sync_add_and_fetch_2'
u_atomic_test.c:(.text+0x1124): undefined reference to `__sync_add_and_fetch_2'
u_atomic_test.c:(.text+0x1188): undefined reference to `__sync_sub_and_fetch_2'
u_atomic_test.c:(.text+0x11c4): undefined reference to `__sync_sub_and_fetch_2'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_int32_t':
u_atomic_test.c:(.text+0x12d4): undefined reference to
`__sync_val_compare_and_swap_4'
u_atomic_test.c:(.text+0x1330): undefined reference to
`__sync_val_compare_and_swap_4'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_int32_t':
u_atomic_test.c:(.text+0x13cc): undefined reference to `__sync_add_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_int32_t':
u_atomic_test.c:(.text+0x1438): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x149c): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x1508): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x1574): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x15ac): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x1610): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x1648): undefined reference to `__sync_sub_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_uint32_t':
u_atomic_test.c:(.text+0x1750): undefined reference to
`__sync_val_compare_and_swap_4'
u_atomic_test.c:(.text+0x17ac): undefined reference to
`__sync_val_compare_and_swap_4'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_uint32_t':
u_atomic_test.c:(.text+0x1844): undefined reference to `__sync_add_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_uint32_t':
u_atomic_test.c:(.text+0x18ac): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x1910): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x197c): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x19e8): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x1a20): undefined reference to `__sync_add_and_fetch_4'
u_atomic_test.c:(.text+0x1a84): undefined reference to `__sync_sub_and_fetch_4'
u_atomic_test.c:(.text+0x1abc): undefined reference to `__sync_sub_and_fetch_4'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_int64_t':
u_atomic_test.c:(.text+0x1c14): undefined reference to
`__sync_val_compare_and_swap_8'
u_atomic_test.c:(.text+0x1cb4): undefined reference to
`__sync_val_compare_and_swap_8'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_int64_t':
u_atomic_test.c:(.text+0x1d80): undefined reference to `__sync_add_and_fetch_8'
/tmp//ccIl4d4c.o: In function `test_atomic_int64_t':
u_atomic_test.c:(.text+0x1e10): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x1eb4): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x1f4c): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x2000): undefined reference to `__sync_add_and_fetch_8'
u_atomic_test.c:(.text+0x2050): undefined reference to `__sync_add_and_fetch_8'
u_atomic_test.c:(.text+0x20f8): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x215c): undefined reference to `__sync_sub_and_fetch_8'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_uint64_t':
u_atomic_test.c:(.text+0x2304): undefined reference to
`__sync_val_compare_and_swap_8'
u_atomic_test.c:(.text+0x23a4): undefined reference to
`__sync_val_compare_and_swap_8'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_uint64_t':
u_atomic_test.c:(.text+0x2470): undefined reference to `__sync_add_and_fetch_8'
/tmp//ccIl4d4c.o: In function `test_atomic_uint64_t':
u_atomic_test.c:(.text+0x2500): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x25a4): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x263c): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x26f0): undefined reference to `__sync_add_and_fetch_8'
u_atomic_test.c:(.text+0x2740): undefined reference to `__sync_add_and_fetch_8'
u_atomic_test.c:(.text+0x27e8): undefined reference to `__sync_sub_and_fetch_8'
u_atomic_test.c:(.text+0x284c): undefined reference to `__sync_sub_and_fetch_8'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_int8_t':
u_atomic_test.c:(.text+0x29a8): undefined reference to
`__sync_val_compare_and_swap_1'
u_atomic_test.c:(.text+0x2a0c): undefined reference to
`__sync_val_compare_and_swap_1'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_int8_t':
u_atomic_test.c:(.text+0x2aa4): undefined reference to `__sync_add_and_fetch_1'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_uint8_t':
u_atomic_test.c:(.text+0x2b5c): undefined reference to
`__sync_val_compare_and_swap_1'
u_atomic_test.c:(.text+0x2bb8): undefined reference to
`__sync_val_compare_and_swap_1'
/tmp//ccIl4d4c.o: In function `test_atomic_8bits_uint8_t':
u_atomic_test.c:(.text+0x2c54): undefined reference to `__sync_add_and_fetch_1'
/tmp//ccIl4d4c.o: In function `test_atomic_assign_bool':
u_atomic_test.c:(.text+0x2d20): undefined reference to
`__sync_val_compare_and_swap_1'
u_atomic_test.c:(.text+0x2d98): undefined reference to
`__sync_val_compare_and_swap_1'
collect2: ld returned 1 exit status</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>