Mac 上的问题:“重新加载 asm 时无法在 BREG 类中找到寄存器”

发布于 2024-09-29 08:49:02 字数 474 浏览 1 评论 0原文

我尝试将一些代码移植到 Mac OS X 上。

该程序使用“ttmath”库,一个头文件 big-num 头库。 这个库在windows和linux上都工作得很好,但是当我尝试在Mac上编译并运行它时,总是出现以下错误消息:

"can't find a register in class 'BREG' while reloading 'asm'".

我发现一些文档说这个问题是由于旧版本的GCC编译器(build 5488),但是在我更新 GCC 后这条消息仍然出现。

目前我的 GCC 版本是:

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)

操作系统是: Mac OS X 版本 10.5.8

我找不到任何有关如何解决此问题的有用信息,有人可以帮助我吗?多谢!

I tried to port some code onto Mac OS X.

The program uses the "ttmath" library, a header big-num header library.
This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up :

"can't find a register in class 'BREG' while reloading 'asm'".

I found some documents say that this problem is due to the old version of GCC compiler (build 5488), but this message still shows up after I updated GCC.

currently my GCC version is :

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)

and the OS is:
Mac OS X version 10.5.8

I can't find any useful information about how to solve this problem, is there anyone can help me? Thanks a lot!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍风燃霜 2024-10-06 08:49:03

感谢DeadMG!
此问题是由于 PIC 安全选项造成的。

我在编译代码时添加了 "-mdynamic-no-pic""-fno-pic" ,现在工作正常:)

Thanks for DeadMG!
This problem is due to the PIC-safe option.

I added "-mdynamic-no-pic" and "-fno-pic" when I compile the code, and it works fine now :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文