简体   繁体   English

构建 mingw-w64 交叉编译器时启用线程本地存储

[英]Enable Thread Local Storage when building a mingw-w64 cross-compiler

I've been trying for days to build a mingw-w64 toolchain, I'm stuck at building the cross-compiler, GCC 8.1.0.几天来我一直在尝试构建一个 mingw-w64 工具链,我一直在构建交叉编译器 GCC 8.1.0。

The problem is that I must have Thread Local Storage (TLS) enabled, therefore I pass --enable-tls to GCC's configure script.问题是我必须启用线程本地存储 (TLS),因此我将--enable-tls传递给 GCC 的配置脚本。

With no success, since at the end of the build, _GLIBCXX_HAVE_TLS is undefined in config.h , same thing for _GLIBCXX_HAVE_CC_TLS .没有成功,因为在构建结束时, _GLIBCXX_HAVE_TLSconfig.h未定义,对于_GLIBCXX_HAVE_CC_TLS也是如此。

I tried to browse and even patch the autotools files to understand how to make it work.我尝试浏览甚至修补 autotools 文件以了解如何使其工作。

Has anyone encountered this issue?有没有人遇到过这个问题?

Note that the mingw-w64 installer on Windows has TLS symbols, so it must be possible to build GCC for this target and TLS.请注意,Windows 上的 mingw-w64 安装程序具有 TLS 符号,因此必须可以为此目标和 TLS 构建 GCC。

Sorry for this very late response, but trying to resolve the same problem, I just found this commit on GCC: https://github.com/gcc-mirror/gcc/commit/cc1e28878a228b6c4a0872e56d97ac88971b7725很抱歉这个很晚的回复,但试图解决同样的问题,我刚刚在 GCC 上发现了这个提交: https://github.com/gcc-mirror/gcc/commit/cc1e28878a2228b6c8a081727

Seems to be exactly what we need.似乎正是我们所需要的。 Not tested yet on my side.我这边还没有测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM