Mac上的问题:“在重新加载asm时无法在类BREG中找到寄存器” [英] Problem on Mac : "Can't find a register in class BREG while reloading asm"
问题描述
我尝试将一些代码移植到Mac OS X上。
I tried to port some code onto Mac OS X.
程序使用ttmath库,一个标题big-num标题库。
这个库在Windows和linux上都可以正常工作,但是当我尝试在Mac上编译和运行它时,会出现以下错误信息:
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'".
我发现一些文件说这个问题是由于旧版本的GCC编译器,但是在我更新GCC后,此消息仍然显示。
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.
目前我的GCC版本是:
currently my GCC version is :
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
且操作系统为:
Mac OS X版本10.5.8
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!
推荐答案
感谢DeadMG!
此问题是由于PIC安全选项。
Thanks for DeadMG! This problem is due to the PIC-safe option.
我添加了 - mdynamic-no-pic
和 - fno-pic
当我编译代码,它现在工作很好:)
I added "-mdynamic-no-pic"
and "-fno-pic"
when I compile the code, and it works fine now :)
这篇关于Mac上的问题:“在重新加载asm时无法在类BREG中找到寄存器”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!