[llvm-bugs] [Bug 42447] New: "error: TLS attribute mismatch: _glapi_tls_Dispatch" while trying to build Mesa

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 29 14:04:25 PDT 2019


            Bug ID: 42447
           Summary: "error: TLS attribute mismatch: _glapi_tls_Dispatch"
                    while trying to build Mesa
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

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 at sha/.._entry.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._mapi_glapi.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._stub.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._table.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._u_current.c.o'
'src/mapi/shared-glapi/e4b98b6@@glapi at 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
>>> defined in src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._u_current.c.o
>>> defined in src/mapi/shared-glapi/e4b98b6@@glapi at sha/.._entry.c.o
clang-9: error: linker command failed with exit code 1 (use -v to see

It works when using gold or BFD instead of lld.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190629/818c177e/attachment-0001.html>

More information about the llvm-bugs mailing list