https://bugs.llvm.org/show_bug.cgi?id=42447

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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
>>> 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
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to