如何在 Archlinux 中使用 gcc 7.2 编译 gcc 6.4.0

2024-01-05

我正在尝试在 Archlinux 中与 gcc 7.2 独立编译 gcc 6.4.0 。

配置如下:

../configure --prefix=${INSTALL_PREFIX} --enable-languages=c,c++,fortran \
    --enable-threads=posix --enable-tls --enable-libgomp --enable-lto \
    --enable-shared --enable-static --disable-nls --disable-multilib \
    --with-fpmath=sse

编译时,我收到以下错误md-unwind-support.h:

md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type 'struct ucontext'

我比较了md-unwind-support.h在 gcc 6.4.0 和 gcc 7.2.0 中定义之间发现struct ucontext定义为ucontext_t在海湾合作委员会7.2.0中。

所以,我做了一些改变md-unwind-support.hgcc 6.4.0 源代码树,但遇到了一些命名空间问题,如下所示:

int std::uncaught_exceptions() should have been declared inside 'std'

我被困住了,对这个问题一无所知。

任何帮助和建议都会有所帮助。


为了有make要工作你必须修改文件make_folder/libgcc/config/i386/linux_unwind.h where make_folder是您键入的文件夹make命令。

In linux_unwind.h你必须改变struct ucontext *uc_ = context->cfa;61 号线至struct ucontext_t *uc_ = context->cfa;

谢谢Seong https://stackoverflow.com/users/5110507/seong这告诉我们要修改哪个文件。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Archlinux 中使用 gcc 7.2 编译 gcc 6.4.0 的相关文章

随机推荐