Open trcrsired opened 2 years ago
This sounds like the difference between native TLS that Clang emits by default and emulated TLS emitted by GCC. I think Clang has supported native TLS with mingw for quite some time while GCC does not yet implement it. You can tell Clang to use emulated TLS with -femulated-tls
which should emit code that is compatible with GCC's mingw target.
@llvm/issue-subscribers-clang-codegen
i think -femulated-tls should be default for mingw gnu target and -fno-emulated-tls for msvc target or it will break build system.
On Fri, Sep 29, 2023 at 1:48 PM llvmbot @.***> wrote:
@llvm/issue-subscribers-clang-codegen https://github.com/orgs/llvm/teams/issue-subscribers-clang-codegen See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106042
This breaks the canadian compilation for clang from clang on linux or native compilation on windows itself with clang from clang since They generate different code for __call_once which cannot correctly link to GNU libstdc++ on windows.
— Reply to this email directly, view it on GitHub https://github.com/llvm/llvm-project/issues/56135#issuecomment-1741277927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX3IVHMY5HX2UEGIQGOXUWLX44CYFANCNFSM5ZLFZAMQ . You are receiving this because you authored the thread.Message ID: @.***>
i am not using that mingw clang project but a normal GCC cross compiler.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106042
This breaks the canadian compilation for clang from clang on linux or native compilation on windows itself with clang from clang since They generate different code for __call_once which cannot correctly link to GNU libstdc++ on windows.