gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 10:31:45 24 4
gpt4 key购买 nike

我正在尝试在 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在 gcc 7.2.0 中。

所以,我在 md-unwind-support.h 做了一些改动gcc 6.4.0 源代码树,但遇到了一些命名空间问题,如下所示:
int std::uncaught_exceptions() should have been declared inside 'std'

我被卡住了,不知道这个问题。

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

最佳答案

为了拥有make要工作,您必须修改文件 make_folder/libgcc/config/i386/linux_unwind.h哪里make_folder是您在其中键入 make 的文件夹命令。

linux_unwind.h你要改struct ucontext *uc_ = context->cfa;在线61至struct ucontext_t *uc_ = context->cfa;
感谢 Seong这告诉我们要修改什么文件。

关于gcc - 如何在 Archlinux 中使用 gcc 7.2 编译 gcc 6.4.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46999900/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com