<html>
<head>
<base href="https://bugs.llvm.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 - "error: TLS attribute mismatch: _glapi_tls_Dispatch" while trying to build Mesa"
href="https://bugs.llvm.org/show_bug.cgi?id=42447">42447</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"error: TLS attribute mismatch: _glapi_tls_Dispatch" while trying to build Mesa
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bero@lindev.ch
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
</td>
</tr></table>
<p>
<div>
<pre>Trying to build and link Mesa 19.1.1 with current clang+lld results in
/usr/bin/clang -o src/mapi/shared-glapi/libglapi.so.0.0.0
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._entry.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._mapi_glapi.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._stub.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._table.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._u_current.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._u_execmem.c.o' -Wl,--no-undefined
-Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,libglapi.so.0
-Wl,--end-group -Os -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe
-fstack-protector-strong --param=ssp-buffer-size=4 -m64 -mtune=generic -flto
-fuse-ld=lld -Os -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2
-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -m64
-mtune=generic -flto -fuse-ld=lld -Wl,-O2 -flto -Wl,--gc-sections -pthread
ld.lld: error: TLS attribute mismatch: _glapi_tls_Dispatch
<span class="quote">>>> defined in src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._u_current.c.o
>>> defined in src/mapi/shared-glapi/e4b98b6@@glapi@sha/.._entry.c.o</span >
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
It works when using gold or BFD instead of lld.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>